-
Notifications
You must be signed in to change notification settings - Fork 16.6k
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
langchain_core/langchain_community: add ControlMessage to langchain_core and enable passing messages with 'control' role through ChatOllama #30147
base: master
Are you sure you want to change the base?
Conversation
…t_messages_to_ollama_messages and deprecated _format_message_as_text methods
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Several issues with this:
- It's unlikely we are going to add a new message type to core until multiple large providers adopt something similar.
- We should be updating
langchain-ollama
inlibs/partners/ollama
instead of the community implementation, which is deprecated (you should be seeing warning messages if you are using it).
Are you able to use use ChatMessage with a custom role for this instead?
@ccurme a ChatMessage with a custom role can potentially work, but there is currently an incompatibility between the type of the Also, ChatOllama's So in order to go that route, 1) the
and 2) either the ChatMessage's
The ChatMessage can technically work after addressing item If you are ok with this proposed route @ccurme (open to any feedback or alternative suggestions), and if that would satisfy your requirements/use-case @lemassykoi, I am happy to make those changes and open a new PR. |
Very much appreciate the detailed plan! Let's go for it, we can work around / document the issues with |
Description: this creates a ControlMessage class in langchain_core for messages with the 'control' role, and allows passing messages with 'control' role through to ollama through ChatOllama. The update to langchain_ollama’s ChatOllama relies on the added ControlMessage class in langchain_core, so updates to both libs are included in this PR
Issue: Granite 3.2 Thinking #30122
Dependencies: no new dependencies
PR title:
PR message:
Lint and test: format, lint, and test completed and passing in langchain_core and langchain_community.