Langchain core recently introduced the new API method bind_tools on the BaseChatModel class and all the internal tool handling that comes with it.
AIMessage and AIMessageChunk instances are also expected to contain the tool call instructions exclusively in "tool_calls" or "tool_call_chunk" attributes.
Google GenAI chat models do not comply with the new API yet, which makes building model agnostic, generic applications cumbersome. It would be nice if all chat models encapsulate tool calls and result handing in the same way.
Langchain core recently introduced the new API method
bind_tools
on theBaseChatModel
class and all the internal tool handling that comes with it.AIMessage and AIMessageChunk instances are also expected to contain the tool call instructions exclusively in "tool_calls" or "tool_call_chunk" attributes.
Google GenAI chat models do not comply with the new API yet, which makes building model agnostic, generic applications cumbersome. It would be nice if all chat models encapsulate tool calls and result handing in the same way.