pub struct RunSpec {Show 18 fields
pub preamble: Option<String>,
pub static_context: Vec<Document>,
pub additional_params: Option<Value>,
pub options: GenerationOptions,
pub provider_options: ProviderOptions,
pub max_tokens: Option<u64>,
pub temperature: Option<f64>,
pub tool_choice: Option<ToolChoice>,
pub max_turns: Option<usize>,
pub max_invalid_tool_call_retries: usize,
pub max_consecutive_malformed_tool_calls: Option<usize>,
pub output_schema: Option<Schema>,
pub output_mode: OutputMode,
pub output_tool_name: Option<String>,
pub output_tool_description: Option<String>,
pub augment_output_preamble: bool,
pub unhandled_invalid_tool_call: UnhandledInvalidToolCall,
pub accept_unknown_finish_reasons: bool,
}Expand description
Protocol-facing run configuration. See the module docs.
Default equals RunSpec::new, and a field missing from serialized
input takes its value from there.
Fields§
§preamble: Option<String>System prompt.
static_context: Vec<Document>Documents always attached to the request.
additional_params: Option<Value>Provider-specific request parameters, merged into every request.
options: GenerationOptionsPortable generation options every request carries. Omitted from the serialized spec while they hold their defaults.
provider_options: ProviderOptionsTyped per-provider options every request carries. Omitted from the serialized spec while empty.
max_tokens: Option<u64>Maximum tokens the model may generate per call.
temperature: Option<f64>Sampling temperature.
tool_choice: Option<ToolChoice>Tool choice applied to every model call.
max_turns: Option<usize>Total model-call budget for the run. None means the protocol default
of one call.
max_invalid_tool_call_retries: usizeHow many times an invalid model tool call may be retried with feedback.
max_consecutive_malformed_tool_calls: Option<usize>How many consecutive turns may call a tool with arguments that are not
a JSON object. Each such call is answered with feedback; a turn whose
calls all parse resets the count. Past Some(n) such turns in a row,
the run fails. None, the default, sets no limit.
output_schema: Option<Schema>JSON schema the final answer must satisfy, when structured output is requested.
output_mode: OutputModeHow structured output is obtained.
output_tool_name: Option<String>Name of the synthetic output tool when output is collected through a
tool call; None lets the driver pick.
output_tool_description: Option<String>Description of that synthetic tool.
augment_output_preamble: boolWhether the driver may augment the preamble with structured-output instructions.
unhandled_invalid_tool_call: UnhandledInvalidToolCallWhat the run does with a model tool call that cannot be dispatched as written when no hook resolves it.
accept_unknown_finish_reasons: boolWhether a finish reason outside the normalized vocabulary ends a turn
as a normal stop. Carried into every prepared request. Defaults to
false.