Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

krrishdholakia
Copy link

@krrishdholakia krrishdholakia commented Aug 8, 2023

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.

@krrishdholakia
Copy link
Author

also curious - why call it via REST endpoints vs. the sdk or using langchain?

@IIBenII
Copy link

IIBenII commented Aug 16, 2023

Hi @krrishdholakia ,
I tried your PR with Azure endpoint but it's not working,

I can help to implement a better implementation if needed

@eli64s
Copy link
Owner

eli64s commented Sep 30, 2023

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:

  • Update all requirement files with litellm
  • Update the code if theres been any changes to litellm

Thanks!
Eli

@krrishdholakia
Copy link
Author

krrishdholakia commented Oct 3, 2023

Screenshot 2023-10-03 at 3 27 13 PM

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants