pub enum ToolContent {
Text(String),
Parts(Vec<InputContent>),
}Expand description
A tool result as plain text or an ordered list of text and media parts.
Variants§
Text(String)
Plain text, including structured data serialized by the tool.
Parts(Vec<InputContent>)
Multimodal parts in their original order.
Implementations§
Trait Implementations§
Source§impl Clone for ToolContent
impl Clone for ToolContent
Source§impl ComposeSchema for ToolContent
Available on crate feature utoipa only.
impl ComposeSchema for ToolContent
Available on crate feature
utoipa only.Source§impl Debug for ToolContent
impl Debug for ToolContent
Source§impl Default for ToolContent
impl Default for ToolContent
Source§impl<'de> Deserialize<'de> for ToolContent
impl<'de> Deserialize<'de> for ToolContent
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
Source§impl From<&str> for ToolContent
impl From<&str> for ToolContent
Source§impl From<String> for ToolContent
impl From<String> for ToolContent
Source§impl From<Vec<InputContent>> for ToolContent
impl From<Vec<InputContent>> for ToolContent
Source§fn from(value: Vec<InputContent>) -> Self
fn from(value: Vec<InputContent>) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for ToolContent
Available on crate feature schemars only.
impl JsonSchema for ToolContent
Available on crate feature
schemars only.Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ToolContent
impl PartialEq for ToolContent
Source§impl Serialize for ToolContent
impl Serialize for ToolContent
impl StructuralPartialEq for ToolContent
Auto Trait Implementations§
impl Forget for ToolContent
impl Freeze for ToolContent
impl Move for ToolContent
impl RefUnwindSafe for ToolContent
impl Send for ToolContent
impl Sync for ToolContent
impl Unpin for ToolContent
impl UnsafeUnpin for ToolContent
impl UnwindSafe for ToolContent
Blanket Implementations§
impl<T> AgentState for T
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