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 eli64s force-pushed the main branch 23 times, most recently from 452b314 to 60dc0f5 Compare August 29, 2023 23:32
@eli64s eli64s force-pushed the main branch 5 times, most recently from e4dcf66 to e5b1f59 Compare September 22, 2023 08:50
@eli64s eli64s force-pushed the main branch 3 times, most recently from d7a8979 to 7326026 Compare September 26, 2023 18:42
@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.

@krrishdholakia krrishdholakia reopened this Oct 3, 2023
@eli64s eli64s force-pushed the main branch 11 times, most recently from 0cd6eee to f6d8ec0 Compare October 22, 2023 21:49
@eli64s eli64s force-pushed the main branch 3 times, most recently from 787bd12 to fe4dee8 Compare December 4, 2023 04:35
@eli64s eli64s force-pushed the main branch 3 times, most recently from eb85ba5 to acea230 Compare December 11, 2023 14:46
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.

3 participants