Skip to content

Add support for Ollama, Palm, Claude-2, Cohere, Replicate Llama2, CodeLlama, Hugging Face (100+LLMs) - using LiteLLM#25

Open
ishaan-jaff wants to merge 1 commit intoevalplus:masterfrom
ishaan-jaff:master
Open

Add support for Ollama, Palm, Claude-2, Cohere, Replicate Llama2, CodeLlama, Hugging Face (100+LLMs) - using LiteLLM#25
ishaan-jaff wants to merge 1 commit intoevalplus:masterfrom
ishaan-jaff:master

Conversation

@ishaan-jaff
Copy link
Copy Markdown

from litellm import completion

## set ENV variables
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(model="command-nightly", messages)

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

@ishaan-jaff
Copy link
Copy Markdown
Author

@Kristoff-starling @ganler @brutalsavage can I get a review on this PR ?

@Qubitium
Copy link
Copy Markdown
Contributor

Qubitium commented Dec 21, 2024

@ishaan-jaff Doesn't this code break openai? You need to add a litellm to providers and not override openai code.

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.

2 participants