#[non_exhaustive]pub struct EventActions {
pub skip_summarization: bool,
pub state_delta: Option<Struct>,
pub artifact_delta: HashMap<String, i32>,
pub escalate: bool,
pub requested_auth_configs: Option<Struct>,
pub transfer_agent: String,
/* private fields */
}session-service only.Expand description
Actions are parts of events that are executed by the agent.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.skip_summarization: boolOptional. If true, it won’t call model to summarize function response. Only used for function_response event.
state_delta: Option<Struct>Optional. Indicates that the event is updating the state with the given delta.
artifact_delta: HashMap<String, i32>Optional. Indicates that the event is updating an artifact. key is the filename, value is the version.
escalate: boolOptional. The agent is escalating to a higher level agent.
requested_auth_configs: Option<Struct>Optional. Will only be set by a tool response indicating tool request euc. Struct key is the function call id since one function call response (from model) could correspond to multiple function calls. Struct value is the required auth config, which can be another struct.
transfer_agent: StringOptional. If set, the event transfers to the specified agent.
Implementations§
Source§impl EventActions
impl EventActions
pub fn new() -> Self
Sourcepub fn set_skip_summarization<T: Into<bool>>(self, v: T) -> Self
pub fn set_skip_summarization<T: Into<bool>>(self, v: T) -> Self
Sets the value of skip_summarization.
§Example
let x = EventActions::new().set_skip_summarization(true);Sourcepub fn set_state_delta<T>(self, v: T) -> Self
pub fn set_state_delta<T>(self, v: T) -> Self
Sets the value of state_delta.
§Example
use wkt::Struct;
let x = EventActions::new().set_state_delta(Struct::default()/* use setters */);Sourcepub fn set_or_clear_state_delta<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_state_delta<T>(self, v: Option<T>) -> Self
Sets or clears the value of state_delta.
§Example
use wkt::Struct;
let x = EventActions::new().set_or_clear_state_delta(Some(Struct::default()/* use setters */));
let x = EventActions::new().set_or_clear_state_delta(None::<Struct>);Sourcepub fn set_artifact_delta<T, K, V>(self, v: T) -> Self
pub fn set_artifact_delta<T, K, V>(self, v: T) -> Self
Sets the value of artifact_delta.
§Example
let x = EventActions::new().set_artifact_delta([
("key0", 123),
("key1", 456),
]);Sourcepub fn set_escalate<T: Into<bool>>(self, v: T) -> Self
pub fn set_escalate<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_requested_auth_configs<T>(self, v: T) -> Self
pub fn set_requested_auth_configs<T>(self, v: T) -> Self
Sets the value of requested_auth_configs.
§Example
use wkt::Struct;
let x = EventActions::new().set_requested_auth_configs(Struct::default()/* use setters */);Sourcepub fn set_or_clear_requested_auth_configs<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_requested_auth_configs<T>(self, v: Option<T>) -> Self
Sets or clears the value of requested_auth_configs.
§Example
use wkt::Struct;
let x = EventActions::new().set_or_clear_requested_auth_configs(Some(Struct::default()/* use setters */));
let x = EventActions::new().set_or_clear_requested_auth_configs(None::<Struct>);Sourcepub fn set_transfer_agent<T: Into<String>>(self, v: T) -> Self
pub fn set_transfer_agent<T: Into<String>>(self, v: T) -> Self
Sets the value of transfer_agent.
§Example
let x = EventActions::new().set_transfer_agent("example");Trait Implementations§
Source§impl Clone for EventActions
impl Clone for EventActions
Source§fn clone(&self) -> EventActions
fn clone(&self) -> EventActions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more