pub struct RawStreamingToolCall {
pub id: StreamPartId,
pub tool_id: Option<WireId>,
pub internal_call_id: String,
pub call_id: Option<String>,
pub name: String,
pub arguments: Value,
pub signature: Option<String>,
pub additional_params: Option<Value>,
}Expand description
Describes a streaming tool call response (in its entirety)
Fields§
§id: StreamPartIdAccumulation/reconciliation key of the tool call —
StreamPartId::Wire-derived when the provider supplied an id,
minted when the wire omitted one. A key only; the durable id is
RawStreamingToolCall::tool_id.
tool_id: Option<WireId>The provider-issued tool id, when one exists — the durable handle
that becomes ToolCall::id. Absent
means absent: serializers omit the field, and nothing fabricated can
take its place.
internal_call_id: StringRig-generated unique identifier for this tool call.
call_id: Option<String>Provider-specific call ID used by some APIs for tool result correlation.
name: StringTool/function name.
arguments: ValueParsed tool arguments.
signature: Option<String>Optional provider signature associated with the tool call.
additional_params: Option<Value>Additional provider-specific tool call metadata.
Implementations§
Source§impl RawStreamingToolCall
impl RawStreamingToolCall
Sourcepub fn empty() -> RawStreamingToolCall
pub fn empty() -> RawStreamingToolCall
Create an empty tool call accumulator for provider streaming parsers.
Sourcepub fn new(
id: impl Into<StreamPartId>,
name: String,
arguments: Value,
) -> RawStreamingToolCall
pub fn new( id: impl Into<StreamPartId>, name: String, arguments: Value, ) -> RawStreamingToolCall
Create a complete tool call with a generated internal call ID.
Sourcepub fn with_call_id(self, call_id: String) -> RawStreamingToolCall
pub fn with_call_id(self, call_id: String) -> RawStreamingToolCall
Attach a provider-specific call ID.
Sourcepub fn with_signature(self, signature: Option<String>) -> RawStreamingToolCall
pub fn with_signature(self, signature: Option<String>) -> RawStreamingToolCall
Attach or clear a provider signature.
Sourcepub fn with_additional_params(
self,
additional_params: Option<Value>,
) -> RawStreamingToolCall
pub fn with_additional_params( self, additional_params: Option<Value>, ) -> RawStreamingToolCall
Attach provider-specific metadata.
Trait Implementations§
Source§impl Clone for RawStreamingToolCall
impl Clone for RawStreamingToolCall
Source§fn clone(&self) -> RawStreamingToolCall
fn clone(&self) -> RawStreamingToolCall
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more