hashbrown

UseStructuredCompletionOptions

Options for the useStructuredCompletion hook.

API

UseStructuredCompletionOptions
@typeInput
@typeSchema
s.SchemaOutput
debounceTime
number

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

debugName
string

The name of the hook, useful for debugging.

input
Input | null | undefined

The input string to predict from.

model
ModelInput

The LLM model to use for the chat.

retries
number

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

schema
Schema

The schema to use for the chat.

structuredOutput
Chat.Api.StructuredOutputOptions

Controls how the provider is asked to produce structured output.

system
string

The system message to use for the chat.

threadId
string

Optional thread identifier used to load or continue an existing conversation.

tools
Chat.AnyTool[]

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

transport
TransportOrFactory

Optional transport override for this hook.

ui
boolean

Whether this completion should be treated as UI-generating.