pub enum ToolResultOutput {
Text {
value: String,
provider_options: Option<ProviderOptions>,
},
Json {
value: JsonValue,
provider_options: Option<ProviderOptions>,
},
ExecutionDenied {
reason: Option<String>,
provider_options: Option<ProviderOptions>,
},
ErrorText {
value: String,
provider_options: Option<ProviderOptions>,
},
ErrorJson {
value: JsonValue,
provider_options: Option<ProviderOptions>,
},
Content {
value: Vec<ToolOutputPart>,
},
}Expand description
Payload variants for a tool result.
Mirrors LanguageModelV4ToolResultOutput. Content carries a list of
mixed text / file / custom parts.
Variants§
Text
Text output, sent verbatim back to the model.
Fields
§
provider_options: Option<ProviderOptions>Provider-specific options.
Json
JSON output.
Fields
§
provider_options: Option<ProviderOptions>Provider-specific options.
ExecutionDenied
User denied execution.
Fields
§
provider_options: Option<ProviderOptions>Provider-specific options.
ErrorText
Error reported as a string.
Fields
§
provider_options: Option<ProviderOptions>Provider-specific options.
ErrorJson
Error reported as structured JSON.
Fields
§
provider_options: Option<ProviderOptions>Provider-specific options.
Content
Multi-part output (text / file / custom).
Fields
§
value: Vec<ToolOutputPart>Ordered output parts.
Trait Implementations§
Source§impl Clone for ToolResultOutput
impl Clone for ToolResultOutput
Source§fn clone(&self) -> ToolResultOutput
fn clone(&self) -> ToolResultOutput
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ToolResultOutput
impl Debug for ToolResultOutput
Source§impl<'de> Deserialize<'de> for ToolResultOutput
impl<'de> Deserialize<'de> for ToolResultOutput
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 PartialEq for ToolResultOutput
impl PartialEq for ToolResultOutput
Source§fn eq(&self, other: &ToolResultOutput) -> bool
fn eq(&self, other: &ToolResultOutput) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ToolResultOutput
impl Serialize for ToolResultOutput
impl StructuralPartialEq for ToolResultOutput
Auto Trait Implementations§
impl Freeze for ToolResultOutput
impl RefUnwindSafe for ToolResultOutput
impl Send for ToolResultOutput
impl Sync for ToolResultOutput
impl Unpin for ToolResultOutput
impl UnsafeUnpin for ToolResultOutput
impl UnwindSafe for ToolResultOutput
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