Langchain not supporting OCI Generative AI Chatting, Only text generation #22641
Replies: 3 comments 5 replies
-
Hi, I'm exactly in the same page. Working with langchain and OpenAI in the last week without any problems but when trying to use with Generative AI we have this error: "Model cohere.command-r-16k does not have TextGeneration capability" I've printed every available and not expired models and none of them have TextGeneration capability capabilities: ['CHAT']
|
Beta Was this translation helpful? Give feedback.
-
I am afraid I already got the answer. Text Generation models are only available in Chicago region https://docs.oracle.com/en-us/iaas/Content/generative-ai/pretrained-models.htm We will have to keep waiting |
Beta Was this translation helpful? Give feedback.
-
Finally I could make it work. I don't know if langchain launched a fix but if you use ChatOCIGenAI instead of OCIGenAI it works with chat models and you can use it in chains. For example, when using chat models use this: from langchain_community.chat_models import ChatOCIGenAI instead of this: from langchain_community.llms import OCIGenAI |
Beta Was this translation helpful? Give feedback.
-
Checked other resources
Commit to Help
Example Code
Description
Hi,
Oracle has announced that OCI Generative AI is now available in a new region, Frankfurt, with chat capabilities. When I attempted to run the attached code, I encountered the following error:
'message': 'Model cohere.command-r-16k does not have TextGeneration capability.'
This is accurate since the model only supports chatting, not text generation. Therefore, I am inquiring about when Langchain will support both TextGeneration and Chatting capabilities.
System Info
langchain==0.1.1
langchain-community==0.0.20
langchain-core==0.1.23
Mac
Python 3.12.0
Beta Was this translation helpful? Give feedback.
All reactions