pub struct ApiChatRequest {
pub messages: Vec<ApiChatMessage>,
pub tools: Vec<ApiTool>,
pub tool_choice: Option<ApiToolChoice>,
pub tool_call_protocol: ApiToolCallProtocol,
pub legacy_functions: Vec<ApiFunction>,
pub legacy_function_call: Option<ApiFunctionCallChoice>,
pub response_format: Option<ApiResponseFormat>,
pub stream_options: Option<ApiStreamOptions>,
}Fields§
§messages: Vec<ApiChatMessage>§tools: Vec<ApiTool>§tool_choice: Option<ApiToolChoice>§tool_call_protocol: ApiToolCallProtocolWire protocol emitted by the model’s chat template for automatic tool calls. Forced/named calls may still use a hard argument grammar and the JSON fallback.
legacy_functions: Vec<ApiFunction>§legacy_function_call: Option<ApiFunctionCallChoice>§response_format: Option<ApiResponseFormat>§stream_options: Option<ApiStreamOptions>Implementations§
Source§impl ApiChatRequest
impl ApiChatRequest
Sourcepub fn generated_control_token_texts(&self) -> &'static [&'static str]
pub fn generated_control_token_texts(&self) -> &'static [&'static str]
Protocol controls are generatable only when this request can emit a
modern tool call. tool_choice: none must not widen token sampling.
Sourcepub fn generated_response_envelope(&self) -> Option<ResponseCompletionEnvelope>
pub fn generated_response_envelope(&self) -> Option<ResponseCompletionEnvelope>
Alternate complete response envelope available to this request.
Trait Implementations§
Source§impl Clone for ApiChatRequest
impl Clone for ApiChatRequest
Source§fn clone(&self) -> ApiChatRequest
fn clone(&self) -> ApiChatRequest
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 moreSource§impl Debug for ApiChatRequest
impl Debug for ApiChatRequest
Source§impl<'de> Deserialize<'de> for ApiChatRequest
impl<'de> Deserialize<'de> for ApiChatRequest
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ApiChatRequest
impl PartialEq for ApiChatRequest
Source§impl Serialize for ApiChatRequest
impl Serialize for ApiChatRequest
impl StructuralPartialEq for ApiChatRequest
Auto Trait Implementations§
impl Freeze for ApiChatRequest
impl RefUnwindSafe for ApiChatRequest
impl Send for ApiChatRequest
impl Sync for ApiChatRequest
impl Unpin for ApiChatRequest
impl UnsafeUnpin for ApiChatRequest
impl UnwindSafe for ApiChatRequest
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
Mutably borrows from an owned value. Read more