smoltalk
    Preparing search index...

    Class AssistantMessage

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    _audio?: any
    _content: string | TextPart[] | null
    _cost?: CostEstimate
    _name?: string
    _rawData?: any
    _refusal?: string | null
    _role: "assistant" = ...
    _thinkingBlocks?: ThinkingBlock[]
    _toolCalls?: ToolCall[]
    _usage?: TokenUsage

    Accessors

    • get audio(): any

      Returns any

    • get content(): string

      Returns string

    • set content(value: string): void

      Parameters

      • value: string

      Returns void

    • get name(): string | undefined

      Returns string | undefined

    • get rawData(): any

      Returns any

    • get refusal(): string | null | undefined

      Returns string | null | undefined

    • get role(): "assistant"

      Returns "assistant"

    Methods

    • Parameters

      • content: string | unknown[] | null | undefined

      Returns string

    • Returns {
          content:
              | string
              | (
                  | { signature: string; thinking: string; type: "thinking" }
                  | { text: string; type: "text" }
                  | {
                      id: string;
                      input: Record<string, any>;
                      name: string;
                      type: "tool_use";
                  }
              )[];
          role: "assistant";
      }

    • Returns {
          audio?: any;
          content: string | { text: string; type: "text" }[] | null;
          cost?: {
              cachedInputCost?: number;
              currency: string;
              inputCost: number;
              outputCost: number;
              totalCost: number;
          };
          name?: string;
          rawData?: any;
          refusal?: string
          | null;
          role: "assistant";
          thinkingBlocks?: { signature: string; text: string }[];
          toolCalls?: { arguments: Record<string, any>; id: string; name: string }[];
          usage?: {
              cachedInputTokens?: number;
              inputTokens: number;
              outputTokens: number;
              totalTokens?: number;
          };
      }