pub struct TurnInput {
pub items: Vec<InputItem>,
pub image_blobs: HashMap<String, Vec<u8>>,
pub mode_turn_options: Option<ModeTurnOptions>,
pub trace_turn_id: Option<String>,
pub mode_extension: Option<ModeTurnExtensionHandle>,
pub turn_context: TurnContext,
}Expand description
Host-provided per-turn input.
Fields§
§items: Vec<InputItem>§image_blobs: HashMap<String, Vec<u8>>§mode_turn_options: Option<ModeTurnOptions>Per-turn override for mode-owned turn options.
trace_turn_id: Option<String>Optional externally-stable trace turn id. Normal runtime callers leave this empty and the runtime generates one per outer turn.
mode_extension: Option<ModeTurnExtensionHandle>§turn_context: TurnContextImplementations§
Source§impl TurnInput
impl TurnInput
pub fn empty() -> Self
pub fn text(text: impl Into<String>) -> Self
pub fn items(items: impl IntoIterator<Item = InputItem>) -> Self
pub fn with_image_blob(self, id: impl Into<String>, bytes: Vec<u8>) -> Self
pub fn with_image_blobs<I, K>(self, image_blobs: I) -> Self
pub fn with_image_ref(self, id: impl Into<String>, bytes: Vec<u8>) -> Self
pub fn with_mode_turn_options(self, options: ModeTurnOptions) -> Self
pub fn with_trace_turn_id(self, trace_turn_id: impl Into<String>) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TurnInput
impl<'de> Deserialize<'de> for TurnInput
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 TurnInput
impl !RefUnwindSafe for TurnInput
impl Send for TurnInput
impl Sync for TurnInput
impl Unpin for TurnInput
impl UnsafeUnpin for TurnInput
impl !UnwindSafe for TurnInput
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