Bind tool-like objects to this chat model.
Assumes model is compatible with OpenAI tool-calling API.
bind_tools(
self,
tools: Sequence[dict[str, Any] | type | Callable | BaseTool],
*,
tool_choice: dict | str | Literal['auto', 'any'] | bool | None = None,
**kwargs: Any = {}
) -> Runnable[LanguageModelInput, AIMessage]| Name | Type | Description |
|---|---|---|
tools* | Sequence[dict[str, Any] | type | Callable | BaseTool] | A list of tool definitions to bind to this chat model. Supports any tool definition handled by |
tool_choice | dict | str | Literal['auto', 'any'] | bool | None | Default: NoneIf provided, which tool for model to call. This parameter is currently ignored as it is not supported by Ollama. |
kwargs | Any | Default: {}Any additional parameters are passed directly to
|