pub struct OpenResponsesCreateRequest {Show 37 fields
pub model: String,
pub input: OpenResponsesInput,
pub instructions: Option<String>,
pub previous_response_id: Option<String>,
pub stream: Option<bool>,
pub stream_options: Option<StreamOptions>,
pub background: Option<bool>,
pub store: Option<bool>,
pub metadata: Option<Value>,
pub include: Option<Vec<IncludeOption>>,
pub max_output_tokens: Option<usize>,
pub temperature: Option<f64>,
pub top_p: Option<f64>,
pub presence_penalty: Option<f32>,
pub frequency_penalty: Option<f32>,
pub top_logprobs: Option<usize>,
pub tools: Option<Vec<Tool>>,
pub tool_choice: Option<ToolChoice>,
pub parallel_tool_calls: Option<bool>,
pub max_tool_calls: Option<usize>,
pub reasoning: Option<ReasoningConfig>,
pub text: Option<TextConfig>,
pub truncation: Option<TruncationStrategy>,
pub stop_seqs: Option<StopTokens>,
pub response_format: Option<ResponseFormat>,
pub logit_bias: Option<HashMap<u32, f32>>,
pub logprobs: bool,
pub n_choices: usize,
pub repetition_penalty: Option<f32>,
pub top_k: Option<usize>,
pub grammar: Option<Grammar>,
pub min_p: Option<f64>,
pub dry_multiplier: Option<f32>,
pub dry_base: Option<f32>,
pub dry_allowed_length: Option<usize>,
pub dry_sequence_breakers: Option<Vec<String>>,
pub web_search_options: Option<WebSearchOptions>,
}Expand description
OpenResponses API create request
Fields§
§model: StringThe model to use for this request
input: OpenResponsesInputThe input for the response - can be a string or array of input items
instructions: Option<String>Additional instructions that guide the model’s behavior
previous_response_id: Option<String>ID of a previous response for multi-turn conversations
stream: Option<bool>Whether to stream the response using server-sent events
stream_options: Option<StreamOptions>Stream options for controlling streaming behavior
background: Option<bool>Whether to run the request in background (async)
store: Option<bool>Whether to store the response for later retrieval
metadata: Option<Value>User-provided metadata (up to 16 key-value pairs)
include: Option<Vec<IncludeOption>>Specifies additional content to include in the response
max_output_tokens: Option<usize>Maximum number of output tokens to generate
temperature: Option<f64>Temperature for sampling (0-2)
top_p: Option<f64>Top-p (nucleus) sampling parameter (0-1)
presence_penalty: Option<f32>Presence penalty (-2.0 to 2.0)
frequency_penalty: Option<f32>Frequency penalty (-2.0 to 2.0)
top_logprobs: Option<usize>Number of top log probabilities to return
tools: Option<Vec<Tool>>Tool definitions available for the model to call
tool_choice: Option<ToolChoice>Controls how the model uses tools
parallel_tool_calls: Option<bool>Whether to allow parallel tool calls.
NOTE: Only true (default) or None is supported. Setting this to false
will return an error as mistral.rs does not support disabling parallel tool calls.
max_tool_calls: Option<usize>Maximum number of tool calls allowed.
NOTE: This parameter is not supported. Setting any value will return an error as mistral.rs does not support limiting the number of tool calls.
reasoning: Option<ReasoningConfig>Configuration for reasoning/thinking behavior
text: Option<TextConfig>Text output configuration
truncation: Option<TruncationStrategy>Truncation strategy when input exceeds context window
stop_seqs: Option<StopTokens>Stop sequences to end generation
response_format: Option<ResponseFormat>Response format (legacy, prefer text field)
logit_bias: Option<HashMap<u32, f32>>Logit bias for token manipulation
logprobs: boolWhether to return log probabilities
n_choices: usizeNumber of completions to generate
repetition_penalty: Option<f32>Repetition penalty (mistral.rs extension)
top_k: Option<usize>Top-k sampling (mistral.rs extension)
grammar: Option<Grammar>Grammar for constrained generation (mistral.rs extension)
min_p: Option<f64>Min-p sampling (mistral.rs extension)
dry_multiplier: Option<f32>DRY multiplier (mistral.rs extension)
dry_base: Option<f32>DRY base (mistral.rs extension)
dry_allowed_length: Option<usize>DRY allowed length (mistral.rs extension)
dry_sequence_breakers: Option<Vec<String>>DRY sequence breakers (mistral.rs extension)
web_search_options: Option<WebSearchOptions>Web search options (mistral.rs extension)
Trait Implementations§
Source§impl Clone for OpenResponsesCreateRequest
impl Clone for OpenResponsesCreateRequest
Source§fn clone(&self) -> OpenResponsesCreateRequest
fn clone(&self) -> OpenResponsesCreateRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ComposeSchema for OpenResponsesCreateRequest
impl ComposeSchema for OpenResponsesCreateRequest
Source§impl Debug for OpenResponsesCreateRequest
impl Debug for OpenResponsesCreateRequest
Source§impl<'de> Deserialize<'de> for OpenResponsesCreateRequest
impl<'de> Deserialize<'de> for OpenResponsesCreateRequest
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>,
Auto Trait Implementations§
impl Freeze for OpenResponsesCreateRequest
impl RefUnwindSafe for OpenResponsesCreateRequest
impl Send for OpenResponsesCreateRequest
impl Sync for OpenResponsesCreateRequest
impl Unpin for OpenResponsesCreateRequest
impl UnwindSafe for OpenResponsesCreateRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Any.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Any.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.