hashbrown

UseUiCompletionResult

The result of the useUiCompletion hook.

API

UseUiCompletionResult
@typeTools
Chat.AnyTool
output
UiAssistantMessage<Tools> | null

The assistant message that contains the rendered UI elements.

rawOutput
UiChatSchema | null

The 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<any>[] | null

The rendered React elements produced by the completion.