Interface: ConversationOptions<T>
Defined in: packages/client/src/conversation.ts:61
Extends
Type Parameters
T
T = unknown
Properties
formatContext?
optionalformatContext?:ContextFormatter
Defined in: packages/client/src/conversation.ts:75
Render a turn's context into the prompt. Default: labeled key/value lines.
localOnly?
optionallocalOnly?:boolean
Defined in: packages/client/src/conversation.ts:58
Only providers that keep data on the visitor's device.
Inherited from
maxSteps?
optionalmaxSteps?:number
Defined in: packages/client/src/conversation.ts:69
Most tool calls per turn. Default 10.
messages?
optionalmessages?:MessageInput[]
Defined in: packages/client/src/conversation.ts:77
Messages to start from.
middleware?
optionalmiddleware?:ToolMiddleware[]
Defined in: packages/client/src/conversation.ts:73
Wrap tool calls: observe, redact, block. Runs after the global middleware.
provider?
optionalprovider?:string|string[]
Defined in: packages/client/src/conversation.ts:56
Only these providers, in this order of preference.
Inherited from
schema?
optionalschema?:JsonSchema
Defined in: packages/client/src/conversation.ts:65
JSON Schema for structured output on every turn.
system?
optionalsystem?:string
Defined in: packages/client/src/conversation.ts:62
timeoutMs?
optionaltimeoutMs?:number
Defined in: packages/client/src/conversation.ts:71
Stop a turn that takes longer than this (the session is kept).
tools?
optionaltools?:ToolDefinition<Record<string,unknown>,unknown>[]
Defined in: packages/client/src/conversation.ts:63
validate?
optionalvalidate?: (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
withoutTools?
optionalwithoutTools?: (message,options) =>unknown
Defined in: packages/client/src/conversation.ts:84
Lets an AI that can't use tools answer anyway, with less: when no
AI that can use them is ready, one that can't answers, and what this
returns joins the turn's context (e.g. the passages that match the
question, found by the page). Without it, tools are required.
Parameters
message
options
signal
AbortSignal
Returns
unknown