struct
AI::Provider::LanguageModel::CallOptions
- AI::Provider::LanguageModel::CallOptions
- Struct
- Value
- Object
Overview
Call options for language model.
Included Modules
- JSON::Serializable
Defined in:
ai/provider/language_model/call_options.crConstructors
- .new(pull : JSON::PullParser)
- .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)
- .new(*, __pull_for_json_serializable pull : JSON::PullParser)
Instance Method Summary
-
#frequency_penalty : Float64 | Nil
Frequency penalty.
-
#headers : Shared::Headers | Nil
Additional HTTP headers.
-
#include_raw_chunks : Bool | Nil
Include raw chunks in stream.
-
#max_output_tokens : Int32 | Nil
Maximum number of tokens to generate.
-
#presence_penalty : Float64 | Nil
Presence penalty.
-
#prompt : Prompt
The prompt to send to the model.
-
#provider_options : Shared::ProviderOptions | Nil
Provider-specific options.
-
#response_format : ResponseFormat | Nil
Response format.
-
#seed : Int32 | Nil
Random seed.
-
#stop_sequences : Array(String) | Nil
Stop sequences.
-
#temperature : Float64 | Nil
Temperature setting.
-
#tool_choice : ToolChoice | Nil
Tool choice.
-
#tools : Array(Tool) | Nil
Available tools.
-
#top_k : Int32 | Nil
Top K sampling.
-
#top_p : Float64 | Nil
Nucleus sampling.