StreamEvent
Defined in the streaming module.Rust AI Agent SDK A single streaming event emitted during LLM response streaming.
Fields
| Name | Type | Description |
|---|---|---|
event_type | StreamEventType | Event type |
timestamp | u64 | Timestamp (milliseconds since epoch) |
content | Option<String> | Text content for DeltaText events |
tool_call | Option<ToolCallData> | Tool call data for DeltaToolCall events |
metadata | HashMap<String | Additional metadata |
error | Option<String> | Error message for Error events |
is_reasoning | bool | Whether this is reasoning/thinking content |
agent_id | Option<String> | Agent ID for multi-agent scenarios |
session_id | Option<String> | Session ID for tracking |
run_id | Option<String> | Run ID for correlation |
Methods
new
| Name | Type |
|---|---|
event_type | StreamEventType |
content
| Name | Type |
|---|---|
content | impl Into<String> |
tool_call
| Name | Type |
|---|---|
tool_call | ToolCallData |
error
| Name | Type |
|---|---|
error | impl Into<String> |
reasoning
| Name | Type |
|---|---|
is_reasoning | bool |
agent_id
| Name | Type |
|---|---|
id | impl Into<String> |
session_id
| Name | Type |
|---|---|
id | impl Into<String> |
run_id
| Name | Type |
|---|---|
id | impl Into<String> |
metadata
| Name | Type |
|---|---|
key | impl Into<String> |
value | impl Into<String> |
request_start
first_token
| Name | Type |
|---|---|
content | impl Into<String> |
delta_text
| Name | Type |
|---|---|
content | impl Into<String> |
stream_end
error_event
| Name | Type |
|---|---|
message | impl Into<String> |
Source
View on GitHub
praisonai/src/streaming/mod.rs at line 119
