[PR #877] [CLOSED] Add support for Llama2, Palm, Cohere, Anthropic, Replicate Models - using litellm #22746

Closed
opened 2026-02-21 20:19:39 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify/pull/877
Author: @ishaan-jaff
Created: 8/16/2023
Status: Closed

Base: mainHead: main


📝 Commits (1)

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 api/core/third_party/langchain/llms/chat_open_ai.py (+2 -2)

📄 Description

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

ChatLiteLLM() is integrated into langchain and allows you to call all models using the OpenAI I/O interface
https://python.langchain.com/docs/integrations/chat/litellm

Here's an example of how to use ChatLiteLLM()

ChatLiteLLM(model="gpt-3.5-turbo")
ChatLiteLLM(model="claude-2", temperature=0.3)
ChatLiteLLM(model="command-nightly")
ChatLiteLLM(model="replicate/llama-2-70b-chat:2c1608e18606fad2812020dc541930f2d0495ce32eee50074220b87300bc16e1")


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify/pull/877 **Author:** [@ishaan-jaff](https://github.com/ishaan-jaff) **Created:** 8/16/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`7d33c61`](https://github.com/langgenius/dify/commit/7d33c61486f65edf264e343ab9b9ef45aeaa0a21) v0 litellm ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `api/core/third_party/langchain/llms/chat_open_ai.py` (+2 -2) </details> ### 📄 Description This PR adds support for models from all the above mentioned providers using https://github.com/BerriAI/litellm/ `ChatLiteLLM()` is integrated into langchain and allows you to call all models using the OpenAI I/O interface https://python.langchain.com/docs/integrations/chat/litellm Here's an example of how to use ChatLiteLLM() ```python ChatLiteLLM(model="gpt-3.5-turbo") ChatLiteLLM(model="claude-2", temperature=0.3) ChatLiteLLM(model="command-nightly") ChatLiteLLM(model="replicate/llama-2-70b-chat:2c1608e18606fad2812020dc541930f2d0495ce32eee50074220b87300bc16e1") ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-21 20:19:39 -05:00
yindo closed this issue 2026-02-21 20:19:40 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#22746