Options for the useCompletion hook.
API
interface UseCompletionOptions<Input, State = unknown> {debounceTime?: number;debugName?: string;input: Input | null | undefined;retries?: number;state?: State;system: string;threadId?: string | undefined;tools?: Chat.AnyTool[];transport?: TransportOrFactory;}UseCompletionOptions
@typeInput@typeStatedebounceTime
numberThe debounce time between sends to the endpoint. default: 150
debugName
stringThe name of the hook, useful for debugging.
input
Input | null | undefinedThe input string to predict from.
retries
numberNumber of retries if an error is received. default: 0
state
StateThe initial shared agent state.
system
stringThe system message to use for the completion.
threadId
string | undefinedOptional opaque AG-UI thread identity.
tools
Chat.AnyTool[]The tools to make available use for the completion. default: []
transport
TransportOrFactoryOptional transport override for this hook.