-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Cohere models #203
base: main
Are you sure you want to change the base?
Conversation
Hi Pydantic-AI Maintainers, Cohere employee here. I really am excited about this new library from Pydantic, and I love to see Cohere models added as well. I published this WIP PR to help making this happen. It currently only supports non-streaming chat, but if I get initial blessing on your willingness to add Cohere and the direction I am going on in this direction, then I am happy to update the PR and add streaming support. Looking forward to hearing from you! Thanks, |
2e49958
to
28143f3
Compare
Hi @rafidka, thanks so much for the contribution and sorry for the slow reply. As per #239 we'd definitely be happy to add support for Cohere! Note: we've made a few changes to internal APIs since you started this PR, let us know if you have any questions or need any help, you can always join our slack if you want more immediate help. |
@samuelcolvin , thank you, great to hear you are willing to integrate Cohere with your library <3 BTW, we announced another model yesterday, which is "provides state-of-the-art performance in its class of open-weights models". |
28143f3
to
d763c28
Compare
I updated my PR to work with the new changes. Question: would you want to have streaming support as well in the same PR, or you are ok breaking this down into two PRs? |
Any update on this? |
I'm happy for streaming to come in a follow up pr. |
Great! I will rebase the PR again then and hopefully can get it merged so I do the streaming next. |
d763c28
to
8defdbb
Compare
Added support for Cohere models by introducing the `models/cohere.py` file. Currently, the support is limited to non-streaming, but streaming support is planned soon.
8defdbb
to
dfb7326
Compare
@samuelcolvin , I rebased the PR and made the necessary changes based on your recent changes. I would like to get this merged soon if possible, to avoid having to rebase again since this is a quickly evolving code base (I had to refactor the code 2-3 times so far.) Thank you! |
Adding support for Cohere models. Currently, only non-streaming chat is supported.