Options for the useUiCompletion hook.
API
interface UiCompletionOptions<Input, Tools extends Chat.AnyTool = Chat.AnyTool> {components: UiKitInput <
ExposedComponent <
any >> [];debounceTime?: number;debugName?: string;examples?: SystemPrompt;input: Input | null | undefined;model: ModelInput; retries?: number;structuredOutput?: Chat.Api.StructuredOutputOptions;system: string | SystemPrompt; threadId?: string;tools?: Tools[];transport?: TransportOrFactory;}UiCompletionOptions
@typeInput@typeToolsChat.AnyToolcomponents
UiKitInput<ExposedComponent<any>>[]The components that can be rendered by the completion.
debounceTime
numberThe debounce time between requests.
debugName
stringThe name of the hook, useful for debugging.
examples
SystemPromptOptional prompt-based UI examples to include in the wrapper schema description.
input
Input | null | undefinedThe input for the completion.
model
ModelInputThe model to use for the completion.
retries
numberNumber of retries if an error is received.
structuredOutput
Chat.Api.StructuredOutputOptionsControls how the provider is asked to produce structured output.
system
string | SystemPromptThe system prompt to use for the completion.
threadId
stringOptional thread identifier used to load or continue an existing conversation.
tools
Tools[]The tools to make available to the completion.
transport
TransportOrFactoryOptional transport override for this hook.