Skip to main content

DisplayEvent

Defined in the Display Types module.
Rust AI Agent SDK Display event

Fields

NameTypeDescription
event_typeDisplayEventTypeEvent type
agent_nameOption<String>Agent name (if applicable)
contentOption<String>Content/message
dataHashMap<StringAdditional data
serde_json:Value>Additional data

Methods

new

fn new(event_type: DisplayEventType) -> Self
Create a new display event Parameters:
NameType
event_typeDisplayEventType

agent

fn agent(mut self, name: impl Into<String>) -> Self
Set agent name Parameters:
NameType
nameimpl Into&lt;String&gt;

content

fn content(mut self, content: impl Into<String>) -> Self
Set content Parameters:
NameType
contentimpl Into&lt;String&gt;

data

fn data(mut self, key: impl Into<String>, value: serde_json::Value) -> Self
Add data Parameters:
NameType
keyimpl Into&lt;String&gt;
valueserde_json::Value

Source

View on GitHub

praisonai/src/parity/display_types.rs at line 129