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

Add support for Azure, OpenAI, Palm, Anthropic, Cohere, Replicate Models - using litellm #134

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

Conversation

ishaan-jaff
Copy link

This PR adds support for models from all the above mentioned providers using litellm https://github.com/BerriAI/litellm

TLDR: developer gets:

Here's a sample of how it's used:

from litellm import completion

## set ENV variables
# ENV variables can be set in .env file, too. Example in .env.example
os.environ["OPENAI_API_KEY"] = "openai key"
os.environ["COHERE_API_KEY"] = "cohere key"

messages = [{ "content": "Hello, how are you?","role": "user"}]

# openai call
response = completion(model="gpt-3.5-turbo", messages=messages)

# cohere call
response = completion("command-nightly", messages)

# anthropic call
response = completion(model="claude-instant-1", messages=messages)

@ishaan-jaff
Copy link
Author

@swyxio @jakubno can you please take a look at this PR when you get the chance ? Happy to add more docs/tests if this initial PR looks good😊

@krrishdholakia
Copy link

any updates on this? @swyxio @jakubno

@iamjameswalters
Copy link

Very interested in seeing this merged, would be a partial answer to #90

@krrishdholakia
Copy link

hey @iamjameswalters any specific providers /models you're trying to use? want to make sure we have it supported - https://docs.litellm.ai/docs/providers

@iamjameswalters
Copy link

hey @iamjameswalters any specific providers /models you're trying to use? want to make sure we have it supported - https://docs.litellm.ai/docs/providers

Specifically I'm looking to use Starcoder, which it looks like I can do with litellm through the HuggingFace API. I'm taking this PR for a spin right now to see how it works. 🙂️

@ishaan-jaff
Copy link
Author

Hi @swyxio just wanted to follow up on this PR

What was litellm missing to be useful to you? Any feedback here would be helpful

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