OpenResponsesCreateRequest

Struct OpenResponsesCreateRequest 

Source
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: String

The model to use for this request

§input: OpenResponsesInput

The 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: bool

Whether to return log probabilities

§n_choices: usize

Number 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

Source§

fn clone(&self) -> OpenResponsesCreateRequest

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl ComposeSchema for OpenResponsesCreateRequest

Source§

fn compose(generics: Vec<RefOr<Schema>>) -> RefOr<Schema>

Source§

impl Debug for OpenResponsesCreateRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for OpenResponsesCreateRequest

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for OpenResponsesCreateRequest

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl ToSchema for OpenResponsesCreateRequest

Source§

fn name() -> Cow<'static, str>

Return name of the schema. Read more
Source§

fn schemas(schemas: &mut Vec<(String, RefOr<Schema>)>)

Implement reference [utoipa::openapi::schema::Schema]s for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> AsAny for T
where T: Any,

§

fn as_any(&self) -> &(dyn Any + 'static)

§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

§

fn type_name(&self) -> &'static str

Gets the type name of self
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Downcast for T
where T: AsAny + ?Sized,

§

fn is<T>(&self) -> bool
where T: AsAny,

Returns true if the boxed type is the same as T. Read more
§

fn downcast_ref<T>(&self) -> Option<&T>
where T: AsAny,

Forward to the method defined on the type Any.
§

fn downcast_mut<T>(&mut self) -> Option<&mut T>
where T: AsAny,

Forward to the method defined on the type Any.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 F
where T: FromSample<F>,

§

fn into_sample(self) -> T

§

impl<T> PartialSchema for T
where T: ComposeSchema + ?Sized,

§

fn schema() -> RefOr<Schema>

Return ref or schema of implementing type that can then be used to construct combined schemas.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryClone for T
where T: Clone,

§

fn try_clone(&self) -> Result<T, Error>

Clones self, possibly returning an error.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> Ungil for T
where T: Send,