-
Notifications
You must be signed in to change notification settings - Fork 178
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
adding support for claude, azure, cohere, and replicate #34
base: main
Are you sure you want to change the base?
Conversation
also curious - why call it via REST endpoints vs. the sdk or using langchain? |
Hi @krrishdholakia ,
I can help to implement a better implementation if needed |
452b314
to
60dc0f5
Compare
e4dcf66
to
e5b1f59
Compare
d7a8979
to
7326026
Compare
Hey @krrishdholakia, this is a cool project! Using REST endpoints was more of wanting control and flexibility at first, but I've been exploring new implementations recently with Langchain and other frameworks such as LlamaIndex. Litellm looks like a nice way to standardize and consolidate things. Could you add a few items when you get a moment:
Thanks! |
6a405f2
to
f5c9eea
Compare
working litellm changes
Hey @eli64s - here's a screenshot of it working with claude-instant-1. i added the option to save a LLM_API_KEY in os.environ. It felt more natural for me to save my non-openai llm key there vs. in OPENAI_API_KEY. Let me know if there's anything else missing for this PR to be merged. |
0cd6eee
to
f6d8ec0
Compare
787bd12
to
fe4dee8
Compare
eb85ba5
to
acea230
Compare
Hi @eli64s,
Noticed you're calling OpenAI via REST Endpoints. I'm working on litellm (simple library to standardize LLM API Calls - https://github.com/BerriAI/litellm) and was wondering if we could be helpful.
I added support for Claude, Azure, Cohere and Llama2 (via Replicate) with an else-if statement. The code is pretty similar to the OpenAI class - as litellm follows the same pattern as the openai-python sdk.
Would love to know if this helps.
Happy to add additional tests / update documentation, if the initial PR looks good to you.