Bind tool-like objects to this chat model.
Assumes model is compatible with OpenAI tool-calling API.
bind_tools(
self,
tools: Sequence[Union[Dict[str, Any], Type, Callable, BaseTool]],
*,
tool_choice: Optional[Union[dict, str, Literal['auto', 'none'], bool]] = None,
**kwargs: Any = {}
) -> Runnable[LanguageModelInput, AIMessage]| Name | Type | Description |
|---|---|---|
tools* | Sequence[Union[Dict[str, Any], Type, Callable, BaseTool]] | A list of tool definitions to bind to this chat model.
Supports any tool definition handled by
:meth: |
tool_choice | Optional[Union[dict, str, Literal['auto', 'none'], bool]] | Default: NoneWhich tool to require the model to call. Must be the name of the single provided function or "auto" to automatically determine which function to call (if any), or a dict of the form: {"type": "function", "function": {"name": <<tool_name>>}}. |
**kwargs | Any | Default: {}Any additional parameters to pass to the
:class: |