AnthropicParams

class AnthropicParams(temperature: Double? = null, maxTokens: Int? = null, numberOfChoices: Int? = null, speculation: String? = null, schema: LLMParams.Schema? = null, toolChoice: LLMParams.ToolChoice? = null, user: String? = null, additionalProperties: Map<String, JsonElement>? = null, val topP: Double? = null, val topK: Int? = null, val stopSequences: List<String>? = null, val container: String? = null, val mcpServers: List<AnthropicMCPServerURLDefinition>? = null, val serviceTier: AnthropicServiceTier? = null, val thinking: AnthropicThinking? = null) : LLMParams(source)

Anthropic Messages API parameters layered on top of LLMParams.

Constructors

Link copied to clipboard
constructor(temperature: Double? = null, maxTokens: Int? = null, numberOfChoices: Int? = null, speculation: String? = null, schema: LLMParams.Schema? = null, toolChoice: LLMParams.ToolChoice? = null, user: String? = null, additionalProperties: Map<String, JsonElement>? = null, topP: Double? = null, topK: Int? = null, stopSequences: List<String>? = null, container: String? = null, mcpServers: List<AnthropicMCPServerURLDefinition>? = null, serviceTier: AnthropicServiceTier? = null, thinking: AnthropicThinking? = null)

Properties

Link copied to clipboard
val container: String? = null

Container identifier for reuse across requests.

Link copied to clipboard
Link copied to clipboard

MCP servers to be used in this request

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Determines whether to use priority capacity (if available) or standard capacity for this request.

Link copied to clipboard
Link copied to clipboard
val stopSequences: List<String>? = null

Custom text sequences that cause the model to stop generating. If matched, response will have stop_reason of "stop_sequence".

Link copied to clipboard
Link copied to clipboard

Configuration for enabling Claude's extended thinking.

Link copied to clipboard
Link copied to clipboard
val topK: Int? = null

Sample only from top K options for each subsequent token (≥ 0). Recommended for advanced use cases.

Link copied to clipboard
val topP: Double? = null

Nucleus sampling in (0.0, 1.0]; use instead of temperature. Cuts off token sampling at a cumulative probability threshold.

Link copied to clipboard
val user: String?

Functions

Link copied to clipboard
operator fun component1(): Double?
Link copied to clipboard
operator fun component10(): Map<String, JsonElement>?
Link copied to clipboard
operator fun component2(): Int?
Link copied to clipboard
operator fun component3(): Int?
Link copied to clipboard
operator fun component4(): String?
Link copied to clipboard
operator fun component5(): LLMParams.Schema?
Link copied to clipboard
Link copied to clipboard
operator fun component7(): String?
Link copied to clipboard
fun copy(temperature: Double? = this.temperature, maxTokens: Int? = this.maxTokens, numberOfChoices: Int? = this.numberOfChoices, speculation: String? = this.speculation, schema: LLMParams.Schema? = this.schema, toolChoice: LLMParams.ToolChoice? = this.toolChoice, user: String? = this.user, additionalProperties: Map<String, JsonElement>? = this.additionalProperties, topP: Double? = this.topP, topK: Int? = this.topK, stopSequences: List<String>? = this.stopSequences, container: String? = this.container, mcpServers: List<AnthropicMCPServerURLDefinition>? = this.mcpServers, serviceTier: AnthropicServiceTier? = this.serviceTier, thinking: AnthropicThinking? = this.thinking): AnthropicParams

Creates a copy of this instance with the ability to modify any of its properties.

open fun copy(temperature: Double?, maxTokens: Int?, numberOfChoices: Int?, speculation: String?, schema: LLMParams.Schema?, toolChoice: LLMParams.ToolChoice?, user: String?, additionalProperties: Map<String, JsonElement>?): LLMParams
Link copied to clipboard
fun default(default: LLMParams): LLMParams
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String