hashbrown

UseUiCompletionResult

The result of the useUiCompletion hook.

API

interface UseUiCompletionResult<Tools extends Chat.AnyTool> extends Omit<UseStructuredCompletionResult<UiChatSchema>, 'output'>  {
}
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[] | null

The rendered React elements produced by the completion.