Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
ishaan-jaff wants to merge2 commits intopostgresml:master
base:master
Choose a base branch
Loading
fromishaan-jaff:master

Conversation

ishaan-jaff
Copy link

This PR adds support for the above mentioned LLMs using LiteLLMhttps://github.com/BerriAI/litellm/
LiteLLM is a lightweight package to simplify LLM API calls - use any llm as a drop in replacement for gpt-3.5-turbo.

Example

fromlitellmimportcompletion## set ENV variablesos.environ["OPENAI_API_KEY"]="openai key"os.environ["COHERE_API_KEY"]="cohere key"messages= [{"content":"Hello, how are you?","role":"user"}]# openai callresponse=completion(model="gpt-3.5-turbo",messages=messages)# cohere callresponse=completion(model="command-nightly",messages)# anthropic callresponse=completion(model="claude-instant-1",messages=messages)

@ishaan-jaff
Copy link
Author

@levkk@montanalow can I get a review on this PR ?

Copy link
Contributor

@santiatpmlsantiatpml left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@ishaan-jaff Thanks for the PR. litellm seems like a promising addition to pgml-chat. I would like to pull this into our upcoming upgrade to pgml-chat (#1047).
When I try to install litellm using poetry (poetry add litellm) I see the following error. Could you please look into this?

Because no versions of litellm match >0.11.1,<0.12.0 and litellm (0.11.1) depends on appdirs (>=1.4.4,<2.0.0), litellm (>=0.11.1,<0.12.0) requires appdirs (>=1.4.4,<2.0.0).So, because no versions of appdirs match >=1.4.4,<2.0.0 and pgml-chat depends on litellm (^0.11.1), version solving failed.

@cognitivetech
Copy link

👀

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@santiatpmlsantiatpmlsantiatpml left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@ishaan-jaff@cognitivetech@santiatpml

[8]ページ先頭

©2009-2025 Movatter.jp