@airbolt/react-sdk
    Preparing search index...

    Interface UseChatReturn

    Return value of the useChat hook

    interface UseChatReturn {
        clear: () => void;
        clearToken: () => void;
        error: null | Error;
        getTokenInfo: () => TokenInfo;
        hasValidToken: () => boolean;
        input: string;
        isLoading: boolean;
        isStreaming: boolean;
        messages: Message[];
        send: () => Promise<void>;
        setInput: (value: string) => void;
        usage: any;
    }
    Index

    Properties

    clear: () => void

    Clear all messages and reset the conversation

    clearToken: () => void

    Clear the authentication token (useful for logout)

    error: null | Error

    Error from the last send attempt, if any

    getTokenInfo: () => TokenInfo

    Get token information for debugging

    hasValidToken: () => boolean

    Check if there's a valid authentication token

    input: string

    Current input value

    isLoading: boolean

    Whether a message is currently being sent

    isStreaming: boolean

    Whether a response is currently streaming

    messages: Message[]

    Array of all messages in the conversation

    send: () => Promise<void>

    Send the current input as a message

    setInput: (value: string) => void

    Function to update the input value

    usage: any

    Usage information from the last response