pub struct ResponsesRequest {
pub model: String,
pub instructions: Option<String>,
pub stream: Option<bool>,
pub temperature: Option<f32>,
pub top_p: Option<f32>,
pub max_output_tokens: Option<u32>,
pub tools: Vec<ResponsesToolDef>,
pub tool_choice: Option<ResponsesToolChoice>,
pub reasoning: Option<ResponsesReasoning>,
pub store: Option<bool>,
pub extra: Option<String>,
pub input: Option<Input>,
}Fields§
§model: String§instructions: Option<String>becomes a leading system message
stream: Option<bool>§temperature: Option<f32>§top_p: Option<f32>§max_output_tokens: Option<u32>§tools: Vec<ResponsesToolDef>§tool_choice: Option<ResponsesToolChoice>§reasoning: Option<ResponsesReasoning>§store: Option<bool>Accepted but always answered false — llmleaf stores nothing.
extra: Option<String>Dialect-specific passthrough, spliced verbatim into the request body (P7).
raw JSON object
input: Option<Input>Wire input is either a bare string (one user message) or an array of items.
Implementations§
Source§impl ResponsesRequest
impl ResponsesRequest
Sourcepub fn instructions(&self) -> &str
pub fn instructions(&self) -> &str
Returns the value of instructions, or the default value if instructions is unset.
Sourcepub fn stream(&self) -> bool
pub fn stream(&self) -> bool
Returns the value of stream, or the default value if stream is unset.
Sourcepub fn temperature(&self) -> f32
pub fn temperature(&self) -> f32
Returns the value of temperature, or the default value if temperature is unset.
Sourcepub fn max_output_tokens(&self) -> u32
pub fn max_output_tokens(&self) -> u32
Returns the value of max_output_tokens, or the default value if max_output_tokens is unset.
Trait Implementations§
Source§impl Clone for ResponsesRequest
impl Clone for ResponsesRequest
Source§fn clone(&self) -> ResponsesRequest
fn clone(&self) -> ResponsesRequest
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 ResponsesRequest
impl Debug for ResponsesRequest
Source§impl Default for ResponsesRequest
impl Default for ResponsesRequest
Source§impl Message for ResponsesRequest
impl Message for ResponsesRequest
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl PartialEq for ResponsesRequest
impl PartialEq for ResponsesRequest
impl StructuralPartialEq for ResponsesRequest
Auto Trait Implementations§
impl Freeze for ResponsesRequest
impl RefUnwindSafe for ResponsesRequest
impl Send for ResponsesRequest
impl Sync for ResponsesRequest
impl Unpin for ResponsesRequest
impl UnsafeUnpin for ResponsesRequest
impl UnwindSafe for ResponsesRequest
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