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, llama2 and cohere #58

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

Conversation

krrishdholakia
Copy link

@krrishdholakia krrishdholakia commented Aug 8, 2023

Hi @adamyodinsky,

Noticed you're only calling OpenAI. 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.

Added support for Claude, Cohere, Azure and Llama2 (via Replicate) by replacing the ChatOpenAI completion call with a litellm completion call. 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.

@adamyodinsky
Copy link
Owner

adamyodinsky commented Aug 14, 2023

@krrishdholakia

First of all, really appreciate the PR and the initiative mate! this is awsome!

the PR looks ok, but it seems missing some stuff.

  • token window control. as different models have different window size, diff token encoders, we will need to match a window token controller mechanism to each model.
  • how do i choose which model I use? Which vendor?

P.S - there is another project I'm working on where litellm can be useful, I'll check how I can integrate it. also, the langchain guys may find it useful as well. maybe you should holla them as well.

@krrishdholakia
Copy link
Author

@adamyodinsky

re: choosing which model - you can do that by the model parameter

E.g.

completion(model="gpt-3.5-turbo"...)

Could you explain more / point me to example of what you mean regarding token window control? I don't think i saw how you were doing it today

@krrishdholakia
Copy link
Author

Hey @adamyodinsky, can you say more about the token window controller mechanism. What are you looking for here?

@kwuite
Copy link

kwuite commented Nov 22, 2023

@krrishdholakia I have an Azure hosted GPT4 model, will that work with your code out-of-the-box?

@krrishdholakia
Copy link
Author

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