struct

AI::Provider::LanguageModel::CallOptions

Inherits JSON::Serializable < Struct < Value < Object

Call options for language model.

Constructors

new(prompt : Prompt, max_output_tokens : Int32 | Nil = nil, temperature : Float64 | Nil = nil, stop_sequences : Array(String) | Nil = nil, top_p : Float64 | Nil = nil, top_k : Int32 | Nil = nil, presence_penalty : Float64 | Nil = nil, frequency_penalty : Float64 | Nil = nil, response_format : ResponseFormat | Nil = nil, seed : Int32 | Nil = nil, tools : Array(Tool) | Nil = nil, tool_choice : ToolChoice | Nil = nil, include_raw_chunks : Bool | Nil = nil, headers : Shared::Headers | Nil = nil, provider_options : Shared::ProviderOptions | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

frequency_penalty

Frequency penalty.

Source
headers

Additional HTTP headers.

Source
include_raw_chunks

Include raw chunks in stream.

Source
max_output_tokens

Maximum number of tokens to generate.

Source
presence_penalty

Presence penalty.

Source
prompt

The prompt to send to the model.

Source
provider_options

Provider-specific options.

Source
response_format

Response format.

Source
seed

Random seed.

Source
stop_sequences

Stop sequences.

Source
temperature

Temperature setting.

Source
tool_choice

Tool choice.

Source
tools

Available tools.

Source
top_k

Top K sampling.

Source
top_p

Nucleus sampling.

Source