Interface: LocalChatOptions<TResponse>
Defined in: react/src/hooks/useChat.ts:77
Chat with a bot that runs in this process (its model calls go to the provider or a proxy).
Extends
CommonChatOptions
Type Parameters
TResponse
TResponse = string
Properties
chatBot?
optionalchatBot?:Processable<string,TResponse>
Defined in: react/src/hooks/useChat.ts:89
Your own Processable (e.g. a pipeline) as the assistant.
maxToolIterations?
optionalmaxToolIterations?:number
Defined in: react/src/hooks/useChat.ts:87
Maximum tool steps per turn.
model?
optionalmodel?:string|ModelConfig|AISDKLanguageModel
Defined in: react/src/hooks/useChat.ts:79
Model to use (default: core's DEFAULT_MODEL). A proxyUrl goes in its config.
onApprovalRequest?
optionalonApprovalRequest?: (approval) =>void
Defined in: react/src/hooks/useChat.ts:52
Called once for each tool call that waits for the user (auto-approved ones excepted).
Parameters
approval
Returns
void
Inherited from
CommonChatOptions.onApprovalRequest
onError?
optionalonError?: (error) =>void
Defined in: react/src/hooks/useChat.ts:50
Parameters
error
Error
Returns
void
Inherited from
CommonChatOptions.onError
onEvent?
optionalonEvent?: (event,meta) =>void
Defined in: react/src/hooks/useChat.ts:96
Every raw stream event of a turn, before it becomes message parts.
Parameters
event
meta
agentName
string
Returns
void
responseSchema?
optionalresponseSchema?:unknown
Defined in: react/src/hooks/useChat.ts:85
Schema for the reply (JSON Schema or Zod); send then resolves with the parsed value.
shouldAskApproval?
optionalshouldAskApproval?: (toolName) =>boolean
Defined in: react/src/hooks/useChat.ts:57
Whether a gated tool asks the user. Return false to approve its calls without asking. Default: every gated tool asks.
Parameters
toolName
string
Returns
boolean
Inherited from
CommonChatOptions.shouldAskApproval
skills?
optionalskills?:Skill[]
Defined in: react/src/hooks/useChat.ts:83
Keyword-triggered instruction sheets that bundle their own tools.
storage?
optionalstorage?:HistoryStorage
Defined in: react/src/hooks/useChat.ts:94
Where the conversation is kept (default: in memory). It must be a stable reference; the chat shows what it holds when it loads.
systemPrompt?
optionalsystemPrompt?:string
Defined in: react/src/hooks/useChat.ts:80
throttle?
optionalthrottle?:number
Defined in: react/src/hooks/useChat.ts:59
Throttle for message updates while streaming, in ms. Default: none.
Inherited from
CommonChatOptions.throttle
tools?
optionaltools?:Tools
Defined in: react/src/hooks/useChat.ts:81