ART Framework API Docs
    Preparing search index...

    Class AnthropicAdapter

    Implements the ProviderAdapter interface for interacting with Anthropic's Messages API (Claude models) using the official SDK.

    Handles formatting requests, parsing responses, streaming, and tool use.

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    providerName: "anthropic" = 'anthropic'

    The unique identifier name for this provider (e.g., 'openai', 'anthropic').

    Methods

    • Sends a request to the Anthropic Messages API. Translates ArtStandardPrompt to the Anthropic format and handles streaming and tool use.

      Parameters

      • prompt: ArtStandardPrompt

        The standardized prompt messages.

      • options: CallOptions

        Call options, including threadId, traceId, stream, callContext, model (override), tools (available tools), and Anthropic-specific generation parameters from providerConfig.adapterOptions.

      Returns Promise<AsyncIterable<StreamEvent, any, any>>

      A promise resolving to an AsyncIterable of StreamEvent objects.