hashbrown

UseStructuredChatOptions

Options for the useStructuredChat hook.

API

interface UseStructuredChatOptions<Schema extends s.SchemaOutput, Tools extends Chat.AnyTool, Output extends s.InferSchemaOutput<Schema> = s.InferSchemaOutput<Schema>, State = unknown>  {
}
UseStructuredChatOptions
@typeSchema
s.SchemaOutput
@typeTools
Chat.AnyTool
@typeOutput
s.InferSchemaOutput<Schema>
@typeState
debounceTime
number

The debounce time between sends to the endpoint. default: 150

debugName
string

The name of the hook, useful for debugging.

messages
Chat.Message<Output, Tools>[]

The initial messages for the chat. default: 1.0

retries
number

Number of retries if an error is received. default: 0

schema
Schema

The schema to use for the chat.

state
State

The initial shared agent state.

system
string

The system message to use for the chat.

threadId
string | undefined

Optional opaque AG-UI thread identity.

tools
Tools[]

The tools to make available use for the chat. default: []

transport
TransportOrFactory

Optional transport override for this hook.

ui
boolean

Whether this structured chat is expected to produce UI elements.