pub struct CanonicalRequest {Show 19 fields
pub model: String,
pub system: Option<String>,
pub messages: Vec<CanonicalMessage>,
pub max_tokens: u32,
pub temperature: Option<f32>,
pub top_p: Option<f32>,
pub top_k: Option<i32>,
pub stop_sequences: Vec<String>,
pub tools: Vec<CanonicalTool>,
pub tool_choice: Option<CanonicalToolChoice>,
pub stream: bool,
pub thinking: Option<ThinkingConfig>,
pub metadata: Option<Value>,
pub response_format: Option<ResponseFormat>,
pub reasoning_effort: Option<ReasoningEffort>,
pub search: Option<SearchConfig>,
pub code_execution: bool,
pub presence_penalty: Option<f32>,
pub frequency_penalty: Option<f32>,
}Fields§
§model: String§system: Option<String>§messages: Vec<CanonicalMessage>§max_tokens: u32§temperature: Option<f32>§top_p: Option<f32>§top_k: Option<i32>§stop_sequences: Vec<String>§tools: Vec<CanonicalTool>§tool_choice: Option<CanonicalToolChoice>§stream: bool§thinking: Option<ThinkingConfig>§metadata: Option<Value>§response_format: Option<ResponseFormat>§reasoning_effort: Option<ReasoningEffort>§search: Option<SearchConfig>§code_execution: bool§presence_penalty: Option<f32>§frequency_penalty: Option<f32>Implementations§
Source§impl CanonicalRequest
impl CanonicalRequest
pub fn flatten_text(&self) -> String
pub fn derived_gateway_conversation_id(&self) -> Option<GatewayConversationId>
pub fn flatten_message_text(&self, role: Role) -> Option<String>
Trait Implementations§
Source§impl Clone for CanonicalRequest
impl Clone for CanonicalRequest
Source§fn clone(&self) -> CanonicalRequest
fn clone(&self) -> CanonicalRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CanonicalRequest
impl RefUnwindSafe for CanonicalRequest
impl Send for CanonicalRequest
impl Sync for CanonicalRequest
impl Unpin for CanonicalRequest
impl UnsafeUnpin for CanonicalRequest
impl UnwindSafe for CanonicalRequest
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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 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>
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