Polyman Documentation - v3.1.0
    Preparing search index...

    Type Alias ContentPart

    ContentPart:
        | { type: "text"; text: string }
        | {
            type: "reasoning";
            text: string;
            signature?: string;
            redacted?: string;
        }
        | { type: "tool_call"; id: string; name: string; args: unknown }
        | {
            type: "tool_result";
            callId: string;
            content: string;
            isError: boolean;
        }

    One piece of a message's content.

    Type Declaration

    • { type: "text"; text: string }

      Plain text from the user or the model.

    • { type: "reasoning"; text: string; signature?: string; redacted?: string }

      Model reasoning, shown in the UI. Only Anthropic needs it back: a part with a signature or redacted data is sent back unchanged, the rest is never sent back.

      • type: "reasoning"
      • text: string
      • Optionalsignature?: string

        Anthropic thinking block signature.

      • Optionalredacted?: string

        Opaque data of an Anthropic redacted_thinking block.

    • { type: "tool_call"; id: string; name: string; args: unknown }

      The model asks to run a tool. args is the parsed JSON arguments.

    • { type: "tool_result"; callId: string; content: string; isError: boolean }

      The outcome of a tool call, matched to it by callId.