The result of the useUiCompletion hook.
API
interface UseUiCompletionResult<Tools extends Chat.AnyTool> extends Omit<UseStructuredCompletionResult<UiChatSchema>, 'output'> {output: UiAssistantMessage <Tools> | null;rawOutput: UiChatSchema | null;setComponents: Dispatch <
SetStateAction <
UiKitInput <
ExposedComponent <any>
>[]
>
>;ui: ReactElement[] | null;}UseUiCompletionResult
@typeToolsChat.AnyTooloutput
UiAssistantMessage<Tools> | nullThe assistant message that contains the rendered UI elements.
rawOutput
UiChatSchema | nullThe raw structured output returned by the model before rendering components.
setComponents
Dispatch<SetStateAction<UiKitInput<ExposedComponent<any>>[]>>Updates the available components for future completions.
ui
ReactElement[] | nullThe rendered React elements produced by the completion.