pub struct InputItem {
pub id: String,
pub response_id: Option<String>,
pub created_at: Option<String>,
pub role: Option<String>,
pub content: Option<String>,
pub metadata: Option<HashMap<String, Value>>,
}Expand description
Represents an input item associated with a response.
Input items contain the individual messages or prompts that were part of the request to the AI provider.
Fields§
§id: StringUnique identifier for the input item
response_id: Option<String>The response ID this input item belongs to
created_at: Option<String>Timestamp when the input item was created
role: Option<String>The role of the message (e.g., “system”, “user”, “assistant”)
content: Option<String>The content of the message
metadata: Option<HashMap<String, Value>>Additional metadata for the input item
Trait Implementations§
Source§impl<'de> Deserialize<'de> for InputItem
impl<'de> Deserialize<'de> for InputItem
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 InputItem
impl RefUnwindSafe for InputItem
impl Send for InputItem
impl Sync for InputItem
impl Unpin for InputItem
impl UnwindSafe for InputItem
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