Skip to main content

Required Parameters

LocalPromptMessage

Streaming

Streaming Example

See Streaming for more details.

LLM Configuration

Example

Tool Calling

ToolDefinition

You can also pass plain dicts for tools. They will be validated against the schema.

ToolChoice

  • "auto" - Model decides whether to use tools
  • "none" - Model cannot use tools
  • "required" - Model must use a tool
  • {"tool": "name"} - Model must use the specified tool

Tool Calling Example

Provider Configuration

Provider Override

Use provider when using a model not in the built-in list:

Custom API Key

Override the environment variable API key:

Variable Interpolation

See Variables for more details.

Span Options

Example

Disabling Tracing

See Tracing for more details.

Complete Example