pub struct LlmChunk {
pub text: String,
pub pixie: Option<u64>,
}Expand description
One chunk of a model stream, and what it cost.
Fields§
§text: StringThe chunk’s text.
pixie: Option<u64>What this chunk actually cost, in pixie. A host that sees real token counts should report them here: tokens are the true unit, and the schedule’s per-KiB rate is only an approximation of them.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LlmChunk
impl<'de> Deserialize<'de> for LlmChunk
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
impl StructuralPartialEq for LlmChunk
Auto Trait Implementations§
impl Freeze for LlmChunk
impl RefUnwindSafe for LlmChunk
impl Send for LlmChunk
impl Sync for LlmChunk
impl Unpin for LlmChunk
impl UnsafeUnpin for LlmChunk
impl UnwindSafe for LlmChunk
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