langchain-ai / langchain-google

MIT License
78 stars 81 forks source link

ChatGoogleGenerativeAI does not support the new "bind_tools" API method #174

Closed stefankirchfeld closed 2 months ago

stefankirchfeld commented 2 months ago

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.

lkuligin commented 2 months ago

added with the new release. closing but please feel free to re-open if you observe any issues.