Options for the useStructuredChat hook.
API
interface UseStructuredChatOptions<Schema extends s.SchemaOutput, Tools extends Chat.AnyTool, Output extends s.InferSchemaOutput<Schema> = s.InferSchemaOutput<Schema>> {debounceTime?: number;debugName?: string;messages?: Chat.Message<Output, Tools>[];model: ModelInput; retries?: number;schema: Schema;structuredOutput?: Chat.Api.StructuredOutputOptions;system: string;threadId?: string | undefined;tools?: Tools[];transport?: TransportOrFactory;ui?: boolean;}UseStructuredChatOptions
@typeSchemas.SchemaOutput@typeToolsChat.AnyTool@typeOutputs.InferSchemaOutput<Schema>debounceTime
numberThe debounce time between sends to the endpoint. default: 150
debugName
stringThe name of the hook, useful for debugging.
messages
Chat.Message<Output, Tools>[]The initial messages for the chat. default: 1.0
model
ModelInputThe LLM model to use for the chat.
retries
numberNumber of retries if an error is received. default: 0
schema
SchemaThe schema to use for the chat.
structuredOutput
Chat.Api.StructuredOutputOptionsControls how the provider is asked to produce structured output.
system
stringThe system message to use for the chat.
threadId
string | undefinedOptional opaque AG-UI thread identity.
tools
Tools[]The tools to make available use for the chat. default: []
transport
TransportOrFactoryOptional transport override for this hook.
ui
booleanWhether this structured chat is expected to produce UI elements.