Package-level declarations

Types

Link copied to clipboard

Represents content that can be processed or generated by Anthropic systems.

Link copied to clipboard
class AnthropicMCPServerURLDefinition(val name: String, val url: String, val authorizationToken: String? = null, val toolConfiguration: AnthropicToolConfiguration? = null)

Represents an MCP server URL definition for Anthropic client integration. This class defines the properties needed for connecting to and configuring an MCP server.

Link copied to clipboard

Represents a message within the Anthropic LLM system. This data class encapsulates the role of the message and its associated content.

Link copied to clipboard
data class AnthropicMessageRequest(val model: String, val messages: List<AnthropicMessage>, val maxTokens: Int = MAX_TOKENS_DEFAULT, val container: String? = null, val mcpServers: List<AnthropicMCPServerURLDefinition>? = null, val serviceTier: AnthropicServiceTier? = null, val stopSequence: List<String>? = null, val stream: Boolean = false, val system: List<SystemAnthropicMessage>? = null, val temperature: Double? = null, val thinking: AnthropicThinking? = null, val toolChoice: AnthropicToolChoice? = null, val tools: List<AnthropicTool>? = null, val topK: Int? = null, val topP: Double? = null, val additionalProperties: Map<String, JsonElement>? = null)

Represents a request for an Anthropic message-based interaction.

Link copied to clipboard
data class AnthropicResponse(val id: String, val type: String, val role: String, val content: List<AnthropicContent>, val model: String, val stopReason: String? = null, val usage: AnthropicUsage? = null)

Represents the response structure from an Anthropic API call.

Link copied to clipboard

Represents the available service tiers for Anthropic API requests.

Link copied to clipboard
data class AnthropicStreamDelta(val type: String? = null, val text: String? = null, val partialJson: String? = null, val stopReason: String? = null, val toolUse: AnthropicContent.ToolUse? = null)

Represents a delta update from the Anthropic stream response.

Link copied to clipboard
data class AnthropicStreamError(val type: String, val message: String? = null)

Represents an error that occurred during Anthropic streaming response processing.

Link copied to clipboard
data class AnthropicStreamResponse(val type: String, val index: Int? = null, val contentBlock: AnthropicContent? = null, val delta: AnthropicStreamDelta? = null, val message: AnthropicResponse? = null, val usage: AnthropicUsage? = null, val error: AnthropicStreamError? = null)

Represents a response from the Anthropic stream API.

Link copied to clipboard

Configuration for enabling Claude's extended thinking.

Link copied to clipboard
data class AnthropicTool(val name: String, val description: String, val inputSchema: AnthropicToolSchema)

Represents a tool definition for Anthropic integration.

Link copied to clipboard

Represents a sealed interface for different tool choices in the Anthropic client API. This API is marked as internal and may change or be removed without notice.

Link copied to clipboard
class AnthropicToolConfiguration(val allowedTools: List<String>? = null, val enabled: Boolean? = null)

Represents a configuration for tool usage in Anthropic client interactions.

Link copied to clipboard
data class AnthropicToolSchema(val properties: JsonObject, val required: List<String>)

Represents a schema definition for an Anthropic tool utilized in LLM clients. This data class defines the structure expected for tools, including the type of schema, properties, and required fields.

Link copied to clipboard
data class AnthropicUsage(val inputTokens: Int? = null, val outputTokens: Int? = null)

Represents the usage statistics of the Anthropic LLM API.

Link copied to clipboard
sealed interface DocumentSource

Represents a sealed interface for different types of document sources. It defines a contract for how documents can be represented or accessed.

Link copied to clipboard
sealed interface ImageSource

Represents a source of an image. This sealed interface has two implementations: one wrapping a URL and another wrapping raw base64-encoded image data.

Link copied to clipboard
data class SystemAnthropicMessage(val text: String, val type: String = "text")

Represents a system message with designated text and type properties that can be utilized in anthropic system communication.