pub enum CommandStream {
Inline {
text: String,
},
Stored {
file: StoredFile,
preview: String,
truncated: bool,
},
Image {
media_type: String,
file: StoredFile,
},
}Expand description
One output stream of a command.
Variants§
Inline
Output small enough to keep in the result.
Stored
Output written to a file.
Fields
§
file: StoredFileWhere the full output is stored.
Image
Image output, always written to a file.
Implementations§
Source§impl CommandStream
impl CommandStream
Sourcepub fn render_for_model(&self) -> String
pub fn render_for_model(&self) -> String
Renders the stream as the newline-terminated block the model reads; an empty stream renders as the empty string.
§Panics
Panics if the template fails to render, which formatting in-memory strings cannot do.
Trait Implementations§
Source§impl Clone for CommandStream
impl Clone for CommandStream
Source§impl Debug for CommandStream
impl Debug for CommandStream
Source§impl<'de> Deserialize<'de> for CommandStream
impl<'de> Deserialize<'de> for CommandStream
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 CommandStream
Source§impl PartialEq for CommandStream
impl PartialEq for CommandStream
Source§impl Serialize for CommandStream
impl Serialize for CommandStream
impl StructuralPartialEq for CommandStream
Auto Trait Implementations§
impl Freeze for CommandStream
impl RefUnwindSafe for CommandStream
impl Send for CommandStream
impl Sync for CommandStream
impl Unpin for CommandStream
impl UnsafeUnpin for CommandStream
impl UnwindSafe for CommandStream
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