ART Framework API Docs
    Preparing search index...

    Interface ArtStandardMessage

    Represents a single message in the standardized, provider-agnostic ArtStandardPrompt format.

    This structure aims to capture common message elements used by various LLM APIs.

    ArtStandardMessage

    interface ArtStandardMessage {
        content: null | string | object;
        name?: string;
        role: ArtStandardMessageRole;
        tool_call_id?: string;
        tool_calls?: {
            function: { arguments: string; name: string };
            id: string;
            type: "function";
        }[];
    }
    Index

    Properties

    content: null | string | object

    The primary content of the message. The type and interpretation depend on the role:

    • system: string (The system instruction).
    • user: string (The user's text input).
    • assistant: string | null (The AI's text response, or null/empty if only making tool_calls).
    • tool_request: object | null (Structured representation of the tool call, often implicitly handled via assistant message's tool_calls).
    • tool_result: string (Stringified JSON output or error message from the tool execution).
    name?: string

    Optional name associated with the message. Primarily used for tool_result role to specify the name of the tool that was executed.

    The role indicating the source or type of the message.

    tool_call_id?: string

    Optional identifier linking a 'tool_result' message back to the specific 'tool_calls' entry in the preceding 'assistant' message that requested it. Required for 'tool_result' role.

    tool_calls?: {
        function: { arguments: string; name: string };
        id: string;
        type: "function";
    }[]

    Optional array of tool calls requested by the assistant.

    Type declaration

    • function: { arguments: string; name: string }

      Details of the function to be called.

      • arguments: string

        A stringified JSON object representing the arguments for the function.

      • name: string

        The name of the function/tool to call.

    • id: string

      A unique identifier for this specific tool call request.

    • type: "function"

      The type of the tool call, typically 'function'.

    Only relevant for 'assistant' role messages that trigger tool usage. Structure mirrors common provider formats (e.g., OpenAI).