pub struct LanguageModelCallOptions {Show 17 fields
pub prompt: LanguageModelPrompt,
pub stream: Option<bool>,
pub max_output_tokens: Option<u32>,
pub temperature: Option<f32>,
pub top_p: Option<f32>,
pub top_k: Option<u32>,
pub stop_sequences: Option<Vec<String>>,
pub presence_penalty: Option<f32>,
pub frequency_penalty: Option<f32>,
pub response_format: Option<LanguageModelResponseFormat>,
pub seed: Option<u64>,
pub tools: Option<Vec<LanguageModelTool>>,
pub tool_choice: Option<LanguageModelToolChoice>,
pub include_raw_chunks: Option<bool>,
pub abort_signal: Option<CancellationToken>,
pub headers: Option<HeaderMap>,
pub provider_options: Option<ProviderOptions>,
}Expand description
Options for calling a language model
Fields§
§prompt: LanguageModelPromptThe prompt to send to the language model, which is a sequence of messages from the system, user, assistant, and tools
stream: Option<bool>Whether to stream the response as it’s generated, or return it all at once when complete
max_output_tokens: Option<u32>The maximum number of tokens to generate in the response
temperature: Option<f32>Sampling temperature to use, between 0 and 1
top_p: Option<f32>Top-p (nucleus) sampling probability
top_k: Option<u32>Top-k sampling
stop_sequences: Option<Vec<String>>Stop sequences to end generation when encountered
presence_penalty: Option<f32>Presence penalty to penalize new tokens based on whether they appear in the prompt
frequency_penalty: Option<f32>Frequency penalty to penalize new tokens based on their frequency in the prompt
response_format: Option<LanguageModelResponseFormat>The format of the response
seed: Option<u64>Seed for random number generation
tools: Option<Vec<LanguageModelTool>>Tools available to the language model
tool_choice: Option<LanguageModelToolChoice>The tool choice strategy to use when the model calls a tool
include_raw_chunks: Option<bool>Whether to include raw chunks in the response
abort_signal: Option<CancellationToken>Signal to abort the request
headers: Option<HeaderMap>Custom headers to include in the request
provider_options: Option<ProviderOptions>Provider-specific options that can be used to pass additional information to the provider or control provider-specific behavior
Trait Implementations§
Source§impl Clone for LanguageModelCallOptions
impl Clone for LanguageModelCallOptions
Source§fn clone(&self) -> LanguageModelCallOptions
fn clone(&self) -> LanguageModelCallOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more