pub struct GenerateRequest {Show 17 fields
pub request_id: String,
pub model: String,
pub temperature: Option<f32>,
pub sampling: Option<RandomSampling>,
pub decoding: Option<DecodingParameters>,
pub stopping: Option<StoppingCriteria>,
pub response: Option<ResponseOptions>,
pub kv: Option<KvCacheParameters>,
pub truncate_prompt_tokens: u32,
pub priority: i32,
pub session_id: Option<String>,
pub media: Vec<MediaItem>,
pub lora_name: String,
pub watermarking: Option<bool>,
pub kv_hints: Option<KvHintsEnvelope>,
pub engine_reasoning_gate: Option<EngineReasoningGate>,
pub prompt: Option<Prompt>,
}Fields§
§request_id: String§model: String§temperature: Option<f32>Temperature, defaults to model-specific default or 0
sampling: Option<RandomSampling>Parameters controlling random sampling, not applicable if temperature == 0
decoding: Option<DecodingParameters>Parameters for conditionally penalizing/boosting candidate tokens during decoding
stopping: Option<StoppingCriteria>Parameters controlling when generation should stop
response: Option<ResponseOptions>Flags to control what is returned in the response
kv: Option<KvCacheParameters>Parameters controlling KV cache/distribution
truncate_prompt_tokens: u32Truncate prompt tokens; default (0) means no truncation
priority: i32§session_id: Option<String>§media: Vec<MediaItem>Multimodal inputs aligned with placeholder markers in token_ids.
lora_name: StringLoaded LoRA name; empty selects the base model.
watermarking: Option<bool>Apply the engine’s configured watermark. Defaults to true when omitted.
kv_hints: Option<KvHintsEnvelope>§engine_reasoning_gate: Option<EngineReasoningGate>Transitional, to be deprecated: only consulted when the engine runs its own reasoning parser and the structured-output constraint covers only the output after reasoning. Prefer a constraint that covers the full output from the first generated token.
prompt: Option<Prompt>Implementations§
Source§impl GenerateRequest
impl GenerateRequest
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 session_id(&self) -> &str
pub fn session_id(&self) -> &str
Returns the value of session_id, or the default value if session_id is unset.
Sourcepub fn watermarking(&self) -> bool
pub fn watermarking(&self) -> bool
Returns the value of watermarking, or the default value if watermarking is unset.
Trait Implementations§
Source§impl Clone for GenerateRequest
impl Clone for GenerateRequest
Source§impl Debug for GenerateRequest
impl Debug for GenerateRequest
Source§impl Default for GenerateRequest
impl Default for GenerateRequest
Source§impl Message for GenerateRequest
impl Message for GenerateRequest
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
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,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
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,
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,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
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,
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,
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,
self.Source§impl PartialEq for GenerateRequest
impl PartialEq for GenerateRequest
impl StructuralPartialEq for GenerateRequest
Auto Trait Implementations§
impl Freeze for GenerateRequest
impl RefUnwindSafe for GenerateRequest
impl Send for GenerateRequest
impl Sync for GenerateRequest
impl Unpin for GenerateRequest
impl UnsafeUnpin for GenerateRequest
impl UnwindSafe for GenerateRequest
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,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request