pub struct ExecuteBatch {
pub request_id: String,
pub model: String,
pub messages: Vec<Message>,
pub sampling: SamplingParams,
pub stream: bool,
pub estimated_tokens: u32,
}Expand description
One unit of work handed to a ModelRunner. request_id is the
RequestActor’s identifier so completions can be correlated back.
Fields§
§request_id: String§model: String§messages: Vec<Message>§sampling: SamplingParams§stream: boolTrue if the caller wants token-by-token streaming (Tokens
chunks). False if a single final Tokens is acceptable.
estimated_tokens: u32Best-effort estimate of input + max_output tokens, used by
RateLimiterActor to acquire a TPM permit before the request
hits the wire.
Implementations§
Source§impl ExecuteBatch
impl ExecuteBatch
pub fn estimated_tokens(&self) -> u32
Trait Implementations§
Source§impl Clone for ExecuteBatch
impl Clone for ExecuteBatch
Source§fn clone(&self) -> ExecuteBatch
fn clone(&self) -> ExecuteBatch
Returns a duplicate of the value. Read more
1.0.0 · 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 ExecuteBatch
impl Debug for ExecuteBatch
Source§impl<'de> Deserialize<'de> for ExecuteBatch
impl<'de> Deserialize<'de> for ExecuteBatch
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
Auto Trait Implementations§
impl Freeze for ExecuteBatch
impl RefUnwindSafe for ExecuteBatch
impl Send for ExecuteBatch
impl Sync for ExecuteBatch
impl Unpin for ExecuteBatch
impl UnsafeUnpin for ExecuteBatch
impl UnwindSafe for ExecuteBatch
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