pub struct InputMap {
pub user_message: usize,
pub spans: Vec<InputSpan>,
}Expand description
The composition of the user message a turn was started by.
A user message goes out as one message whose first block holds the prompt
text, and it has to stay that way: splitting the sources into separate
content blocks would change the bytes the model receives. So composition is
expressed as coordinates over the message rather than in its structure —
the same reason crate::prompt::PromptBlock::name is a
field and not a delimiter inside the content.
Fields§
§user_message: usizeIndex into the request’s messages. Resolved when the request is assembled, not when the message was pushed: compaction rewrites the message list in between, and an index captured earlier would point at whatever moved into that slot.
spans: Vec<InputSpan>Trait Implementations§
Source§impl<'de> Deserialize<'de> for InputMap
impl<'de> Deserialize<'de> for InputMap
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 Eq for InputMap
impl StructuralPartialEq for InputMap
Auto Trait Implementations§
impl Forget for InputMap
impl Freeze for InputMap
impl Move for InputMap
impl RefUnwindSafe for InputMap
impl Send for InputMap
impl Sync for InputMap
impl Unpin for InputMap
impl UnsafeUnpin for InputMap
impl UnwindSafe for InputMap
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