Type: url

Original: https://blog.langchain.com/tool-calling-with-langchain/

Status: generated

Summary

An April 2024 LangChain blog post introducing a standard interface for tool calling across model providers: ChatModel.bind_tools() for attaching tool definitions to model calls, an AIMessage.tool_calls attribute that returns the model’s tool invocations in a common format, and create_tool_calling_agent(), an agent constructor that works with any model implementing both. It recounts how providers from OpenAI onward added native tool calling through mutually incompatible interfaces, and explains how with_structured_output, built on tool calling for most models, differs from binding tools directly.

Generated pages