BaseChatModelCallOptions: {
    callbacks?: undefined | Callbacks;
    configurable?: undefined | Record<string, any>;
    maxConcurrency?: undefined | number;
    metadata?: undefined | Record<string, unknown>;
    recursionLimit?: undefined | number;
    runId?: undefined | string;
    runName?: undefined | string;
    signal?: undefined | AbortSignal;
    stop?: undefined | string[];
    tags?: undefined | string[];
    timeout?: undefined | number;
    tool_choice?: undefined | ToolChoice;
}

Represents the call options for a base chat model.

Type declaration

  • Optionalcallbacks?: undefined | Callbacks

    Callbacks for this call and any sub-calls (eg. a Chain calling an LLM). Tags are passed to all callbacks, metadata is passed to handle*Start callbacks.

  • Optionalconfigurable?: undefined | Record<string, any>

    Runtime values for attributes previously made configurable on this Runnable, or sub-Runnables.

  • OptionalmaxConcurrency?: undefined | number

    Maximum number of parallel calls to make.

  • Optionalmetadata?: undefined | Record<string, unknown>

    Metadata for this call and any sub-calls (eg. a Chain calling an LLM). Keys should be strings, values should be JSON-serializable.

  • OptionalrecursionLimit?: undefined | number

    Maximum number of times a call can recurse. If not provided, defaults to 25.

  • OptionalrunId?: undefined | string

    Unique identifier for the tracer run for this call. If not provided, a new UUID will be generated.

  • OptionalrunName?: undefined | string

    Name for the tracer run for this call. Defaults to the name of the class.

  • Optionalsignal?: undefined | AbortSignal

    Abort signal for this call. If provided, the call will be aborted when the signal is aborted.

  • Optionalstop?: undefined | string[]

    Stop tokens to use for this call. If not provided, the default stop tokens for the model will be used.

  • Optionaltags?: undefined | string[]

    Tags for this call and any sub-calls (eg. a Chain calling an LLM). You can use these to filter calls.

  • Optionaltimeout?: undefined | number

    Timeout for this call in milliseconds.

  • Optionaltool_choice?: undefined | 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.