The result object-type returned by the useStructuredCompletion hook that provides the structured output and state for the completion.
API
interface UseStructuredCompletionResult<Output> {error: Error | undefined;exhaustedRetries: boolean;isReceiving: boolean;isRunningToolCalls: boolean;isSending: boolean;output: Output | null;reload: () => void;}UseStructuredCompletionResult
@typeOutputerror
Error | undefinedThe error encountered during chat operations, if any.
exhaustedRetries
booleanWhether the current request has exhausted retries.
isReceiving
booleanWhether the chat is receiving a response.
isRunningToolCalls
booleanWhether the chat is running tool calls.
isSending
booleanWhether the chat is sending a response.
output
Output | nullThe output of the chat.
reload
() => voidReload the chat, useful for retrying when an error occurs.