| Name | Type | Description |
|---|---|---|
tools* | Sequence[dict[str, Any] | type | Callable[..., Any] | BaseTool] | A list of tool definitions to bind to this chat model. Can be a dictionary, pydantic model, callable, or BaseTool. Pydantic models, callables, and BaseTools will be automatically converted to their schema dictionary representation. |
tool_choice | dict[str, Any] | str | bool | None | Default: None |
strict | bool | None | Default: None |
kwargs | Any | Default: {} |
Bind tool-like objects to this chat model.
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.
Any additional parameters are passed directly to bind.