pub struct PrompterOptions {
pub other: Vec<String>,
pub input: Option<String>,
pub model: Option<String>,
pub output: Option<String>,
}Expand description
Prompt/response formats and inference-model selection for a Prompter.
Default leaves every optional field unset and other empty, requesting
the program’s defaults. Values are forwarded without capability checks;
model identifiers and any nonstandard format tokens belong to the selected
provider. The example uses an illustrative provider-specific model name.
§Examples
use asimov_patterns::PrompterOptions;
let options = PrompterOptions::builder()
.input("text")
.output("text")
.model("gemma3:1b")
.build();Fields§
§other: Vec<String>Additional arguments, including optional prompt and response file operands.
The wrapper appends these after generated format/model options. Each
string is one literal argument; see crate::programs for ordering.
A named prompt file replaces stdin as the program’s payload source.
input: Option<String>Prompt serialization passed as --input=FORMAT (-i in the CLI).
None omits the option; the specified default is text (UTF-8).
This does not select a prompt file or convert a stored prompt into the
requested format. In particular, text implies no standard chat envelope.
model: Option<String>Inference model passed as --model=MODEL (-m in the CLI).
None omits the option; the specified default is auto, whose selection
policy is program-defined. An explicitly requested unavailable or
unsupported model must cause program failure rather than silent substitution.
output: Option<String>Response serialization passed as --output=FORMAT (-o in the CLI).
None omits the option; the specified default is text (UTF-8).
This selects neither a response file nor a capture policy.
Implementations§
Source§impl PrompterOptions
impl PrompterOptions
Sourcepub fn builder() -> PrompterOptionsBuilder
pub fn builder() -> PrompterOptionsBuilder
Create an instance of PrompterOptions using the builder syntax
Trait Implementations§
Source§impl Args for PrompterOptions
Available on crate feature clap only.
impl Args for PrompterOptions
clap only.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 PrompterOptions
impl Clone for PrompterOptions
Source§impl Debug for PrompterOptions
impl Debug for PrompterOptions
Source§impl Default for PrompterOptions
impl Default for PrompterOptions
impl Eq for PrompterOptions
Source§impl FromArgMatches for PrompterOptions
Available on crate feature clap only.
impl FromArgMatches for PrompterOptions
clap only.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.