struct

Anthropic::BatchRequestParams

Inherits JSON::Serializable < Struct < Value < Object

Parameters for a batch request

Constructors

new(model : String, max_tokens : Int32, messages : Array(MessageParam), system : String | Array(TextContent) | Nil = nil, temperature : Float64 | Nil = nil, top_p : Float64 | Nil = nil, top_k : Int32 | Nil = nil, tools : Array(ToolDefinition | ServerTool) | Nil = nil, tool_choice : ToolChoice | Nil = nil, stop_sequences : Array(String) | Nil = nil, metadata : Metadata | Hash(String, String) | Nil = nil, service_tier : String | Nil = nil, thinking : ThinkingConfig | Nil = nil, cache_control : CacheControl | Nil = nil, container : String | Nil = nil, output_config : OutputConfig | Nil = nil, inference_geo : String | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source
with_tools(model : String, max_tokens : Int32, messages : Array(MessageParam), tools : Array(Tool), server_tools : Array(ServerTool) | Nil = nil, system : String | Array(TextContent) | Nil = nil, temperature : Float64 | Nil = nil, top_p : Float64 | Nil = nil, top_k : Int32 | Nil = nil, tool_choice : ToolChoice | Nil = nil, stop_sequences : Array(String) | Nil = nil, metadata : Metadata | Hash(String, String) | Nil = nil, service_tier : String | Nil = nil, thinking : ThinkingConfig | Nil = nil, cache_control : CacheControl | Nil = nil, container : String | Nil = nil, output_config : OutputConfig | Nil = nil, inference_geo : String | Nil = nil) : self

Helper to create params with Tool objects (converts to ToolDefinition)

Source

Instance methods

cache_control
Source
container
Source
inference_geo
Source
max_tokens
Source
messages
Source
metadata
Source
model
Source
output_config
Source
service_tier
Source
stop_sequences
Source
system
Source
temperature
Source
thinking
Source
tool_choice
Source
tools
Source
top_k
Source
top_p
Source