struct

Arcana::AI::Chat::Request

Inherits Struct < Value < Object

Constructors

from_history(history : History, model : String = "gpt-4o-mini", temperature : Float64 = 0.7, max_tokens : Int32 = 150, tools : Array(Tool) | Nil = nil, tool_choice : String | Nil = nil, trace_tags : Hash(String, String) | Nil = nil) : self

Build from a History object.

Source
new(messages : Array(Message), model : String = "gpt-4o-mini", temperature : Float64 = 0.7, max_tokens : Int32 = 150, tools : Array(Tool) | Nil = nil, server_tools : Array(ServerTool) | Nil = nil, tool_choice : String | Nil = nil, thinking : ThinkingConfig | Nil = nil, trace_tags : Hash(String, String) | Nil = nil)
Source

Instance methods

max_tokens
Source
max_tokens=(max_tokens : Int32)
Source
messages
Source
messages=(messages : Array(Message))
Source
model
Source
model=(model : String)
Source
server_tools
Source
server_tools=(server_tools : Array(ServerTool) | Nil)
Source
temperature
Source
temperature=(temperature : Float64)
Source
thinking
Source
thinking=(thinking : ThinkingConfig | Nil)
Source
tool_choice
Source
tool_choice=(tool_choice : String | Nil)
Source
tools
Source
tools=(tools : Array(Tool) | Nil)
Source
trace_tags
Source
trace_tags=(trace_tags : Hash(String, String) | Nil)
Source