BaseChatModelCallOptions: BaseLanguageModelCallOptions & {
    tool_choice?: ToolChoice;
}

Represents the call options for a base chat model.

Type declaration

  • Optionaltool_choice?: ToolChoice

    Specifies how the chat model should use tools.

    undefined

    Possible values:
    - "auto": The model may choose to use any of the provided tools, or none.
    - "any": The model must use one of the provided tools.
    - "none": The model must not use any tools.
    - A string (not "auto", "any", or "none"): The name of a specific tool the model must use.
    - An object: A custom schema specifying tool choice parameters. Specific to the provider.

    Note: Not all providers support tool_choice. An error will be thrown
    if used with an unsupported model.