| 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 | bool | None | Default: None |
strict | bool | None | Default: None |
parallel_tool_calls | bool | None | Default: None |
response_format | _DictOrPydanticClass | None | Default: None |
kwargs | Any | Default: {} |
Bind tool-like objects to this chat model.
Assumes model is compatible with OpenAI tool-calling API.
Which tool to require the model to call. Options are:
str of the form '<<tool_name>>': calls <<tool_name>> tool.'auto': automatically selects a tool (including no tool).'none': does not call a tool.'any' or 'required' or True: force at least one tool to be called.dict of the form {"type": "function", "function": {"name": <<tool_name>>}}: calls <<tool_name>> tool.False or None: no effect, default OpenAI behavior.If True, model output is guaranteed to exactly match the JSON Schema
provided in the tool definition. The input schema will also be validated according to the
supported schemas.
If False, input schema will not be validated and model output will not
be validated. If None, strict argument will not be passed to the model.
Set to False to disable parallel tool use.
Defaults to None (no specification, which allows parallel tool use).
Optional schema to format model response. If provided and the model does not call a tool, the model will generate a structured response.
Any additional parameters are passed directly to bind.