Learn R Programming

mLLMCelltype (version 1.3.2)

AnthropicProcessor: Anthropic API Processor

Description

Anthropic API Processor

Anthropic API Processor

Arguments

Super class

mLLMCelltype::BaseAPIProcessor -> AnthropicProcessor

Methods

Inherited methods


Method new()

Initialize Anthropic processor

Usage

AnthropicProcessor$new(base_url = NULL)

Arguments

base_url

Optional custom base URL for Anthropic API


Method get_default_api_url()

Get default Anthropic API URL

Usage

AnthropicProcessor$get_default_api_url()

Returns

Default Anthropic API endpoint URL


Method make_api_call()

Make API call to Anthropic

Usage

AnthropicProcessor$make_api_call(chunk_content, model, api_key)

Arguments

chunk_content

Content for this chunk

model

Model identifier

api_key

API key

Returns

httr response object


Method extract_response_content()

Extract response content from Anthropic API response

Usage

AnthropicProcessor$extract_response_content(response, model)

Arguments

response

httr response object

model

Model identifier

Returns

Extracted text content


Method clone()

The objects of this class are cloneable with this method.

Usage

AnthropicProcessor$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Details

Concrete implementation of BaseAPIProcessor for Anthropic models. Handles Anthropic-specific API calls, authentication, and response parsing.