pub struct CompletionOptions {Show 15 fields
pub ai_responds_first: Option<bool>,
pub append: Option<String>,
pub temperature: Option<f32>,
pub name: Option<String>,
pub no_context: Option<bool>,
pub once: Option<bool>,
pub overwrite: Option<bool>,
pub quiet: Option<bool>,
pub prefix_ai: Option<String>,
pub prefix_user: Option<String>,
pub response_count: Option<usize>,
pub stop: Option<Vec<String>>,
pub stream: Option<bool>,
pub tokens_max: Option<usize>,
pub tokens_balance: Option<f32>,
}
Fields§
§ai_responds_first: Option<bool>
Allow the AI to generate a response to the prompt before user input
append: Option<String>
Append a string to an existing session and get only the latest response.
temperature: Option<f32>
Temperature of the model, the allowed range of this value is different across providers, for OpenAI it’s 0 - 2, and Cohere uses a 0 - 5 scale.
name: Option<String>
Saves your conversation context using the session name
no_context: Option<bool>
Disables the context of the conversation, every message sent to the AI is standalone. If you use a coding model this defaults to true unless prompt is specified.
once: Option<bool>
Only do one question / answer cycle and return the result.
overwrite: Option<bool>
Overwrite the existing session if it already exists
quiet: Option<bool>
Only write output the session file
prefix_ai: Option<String>
Prefix ai responses with the supplied string. This can be used for labels if your prompt has a conversational style. Defaults to “AI”
prefix_user: Option<String>
Prefix input with the supplied string. This can be used for labels if your prompt has a conversational style. Defaults to “USER:”
response_count: Option<usize>
Number of responses to generate
stop: Option<Vec<String>>
Stop tokens
stream: Option<bool>
Stream the output to the terminal
tokens_max: Option<usize>
The number of maximum total tokens to allow. The maximum upper value of this is dependant on the model you’re currently using, but often it’s 4096.
tokens_balance: Option<f32>
A percentage given from 0 to 0.9 to indicate what percentage of the current conversation context to keep. Defaults to 0.5
Implementations§
Source§impl CompletionOptions
impl CompletionOptions
pub fn merge(&self, merged: &CompletionOptions) -> Self
pub fn load_session_file<T>( &self, config: &Config, overrides: T, ) -> CompletionFile<T>
pub fn parse_stops(&self) -> Vec<String>
pub fn parse_stream_option(&self) -> Result<bool, ClashingArgumentsError>
pub fn validate(&self) -> Result<(), ClashingArgumentsError>
Trait Implementations§
Source§impl Args for CompletionOptions
impl Args for CompletionOptions
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command
so it can instantiate self
via
FromArgMatches::update_from_arg_matches_mut
Read moreSource§impl Clone for CompletionOptions
impl Clone for CompletionOptions
Source§fn clone(&self) -> CompletionOptions
fn clone(&self) -> CompletionOptions
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CompletionOptions
impl Debug for CompletionOptions
Source§impl Default for CompletionOptions
impl Default for CompletionOptions
Source§fn default() -> CompletionOptions
fn default() -> CompletionOptions
Source§impl<'de> Deserialize<'de> for CompletionOptions
impl<'de> Deserialize<'de> for CompletionOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl FromArgMatches for CompletionOptions
impl FromArgMatches for CompletionOptions
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.