Skip to main content

Interface: ConversationOptions<T>

Defined in: packages/client/src/conversation.ts:61

Extends​

Type Parameters​

T​

T = unknown

Properties​

formatContext?​

optional formatContext?: ContextFormatter

Defined in: packages/client/src/conversation.ts:75

Render a turn's context into the prompt. Default: labeled key/value lines.


localOnly?​

optional localOnly?: boolean

Defined in: packages/client/src/conversation.ts:58

Only providers that keep data on the visitor's device.

Inherited from​

RoutingOptions.localOnly


maxSteps?​

optional maxSteps?: number

Defined in: packages/client/src/conversation.ts:69

Most tool calls per turn. Default 10.


messages?​

optional messages?: MessageInput[]

Defined in: packages/client/src/conversation.ts:77

Messages to start from.


middleware?​

optional middleware?: ToolMiddleware[]

Defined in: packages/client/src/conversation.ts:73

Wrap tool calls: observe, redact, block. Runs after the global middleware.


provider?​

optional provider?: string | string[]

Defined in: packages/client/src/conversation.ts:56

Only these providers, in this order of preference.

Inherited from​

RoutingOptions.provider


schema?​

optional schema?: JsonSchema

Defined in: packages/client/src/conversation.ts:65

JSON Schema for structured output on every turn.


system?​

optional system?: string

Defined in: packages/client/src/conversation.ts:62


timeoutMs?​

optional timeoutMs?: number

Defined in: packages/client/src/conversation.ts:71

Stop a turn that takes longer than this (the session is kept).


tools?​

optional tools?: ToolDefinition<Record<string, unknown>, unknown>[]

Defined in: packages/client/src/conversation.ts:63


validate?​

optional validate?: (value) => T

Defined in: packages/client/src/conversation.ts:67

Validate (and type) the structured output; throw to reject it.

Parameters​

value​

unknown

Returns​

T