pub struct FunctionResultContent {
pub call_id: String,
pub result: Option<Value>,
pub exception: Option<String>,
}Expand description
The result of executing a tool/function.
Fields§
§call_id: String§result: Option<Value>§exception: Option<String>Host-internal diagnostic text for a failed call.
Redacted on serialization to
FUNCTION_INVOCATION_ERROR_MARKER, because its contents are not
under this framework’s control: it may come from a tool, middleware, a
provider or a caller, and a connection string, a SQL error quoting the
row it failed on, or a stack trace naming an internal host are all
ordinary things to find in one. Serialization is what persists a
conversation — the Redis, Cosmos and file history stores, workflow
checkpoints — so without this, every one of those durably stores
whatever a failing tool happened to say. Mirrors upstream #8235.
The model still sees the real text: every provider converter reads
this field directly when building the wire result, rather than going
through serde. Channel-visible error text belongs in
Self::result.
Deserialization is unchanged, so a value stored before this (or the marker itself) reads back as-is.
Implementations§
Trait Implementations§
Source§impl Clone for FunctionResultContent
impl Clone for FunctionResultContent
Source§fn clone(&self) -> FunctionResultContent
fn clone(&self) -> FunctionResultContent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more