pub struct FromLLMPayload {Show 14 fields
pub session_id: i64,
pub response_type: LLMResponseType,
pub text: String,
pub tool_use: Option<ToolUseInfo>,
pub tool_uses: Vec<ToolUseInfo>,
pub is_complete: bool,
pub error: Option<String>,
pub model: String,
pub message_id: String,
pub content_index: usize,
pub stop_reason: Option<String>,
pub input_tokens: i64,
pub output_tokens: i64,
pub turn_id: Option<TurnId>,
}Expand description
Payload for responses from the LLM
Fields§
§session_id: i64Session ID this response belongs to
response_type: LLMResponseTypeType of response
text: StringText content (for TextChunk responses)
tool_use: Option<ToolUseInfo>Single tool use (for ToolUse responses)
tool_uses: Vec<ToolUseInfo>Batch of tool uses (for ToolBatch responses)
is_complete: boolWhether the response is complete
error: Option<String>Error message if response_type is Error
model: StringModel used for this response
message_id: StringMessage ID for streaming (from StreamStart)
content_index: usizeContent block index (for streaming deltas)
stop_reason: Option<String>Stop reason when complete
input_tokens: i64Input tokens used
output_tokens: i64Output tokens generated
turn_id: Option<TurnId>Assistant turn ID
Trait Implementations§
Source§impl Clone for FromLLMPayload
impl Clone for FromLLMPayload
Source§fn clone(&self) -> FromLLMPayload
fn clone(&self) -> FromLLMPayload
Returns a duplicate of the value. Read more
1.0.0 · 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 FromLLMPayload
impl Debug for FromLLMPayload
Source§impl Default for FromLLMPayload
impl Default for FromLLMPayload
Source§fn default() -> FromLLMPayload
fn default() -> FromLLMPayload
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FromLLMPayload
impl RefUnwindSafe for FromLLMPayload
impl Send for FromLLMPayload
impl Sync for FromLLMPayload
impl Unpin for FromLLMPayload
impl UnwindSafe for FromLLMPayload
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more