pub struct ArcSession {Show 19 fields
pub id: String,
pub virtual_key_id: String,
pub virtual_key_name: Option<String>,
pub model: String,
pub provider: String,
pub provider_connection_id: String,
pub primary_provider: Option<String>,
pub requests: i32,
pub input_tokens: i32,
pub output_tokens: i32,
pub violations: i32,
pub firewall_enabled: bool,
pub firewall_outcome: Option<String>,
pub firewall_stage: Option<String>,
pub firewall_policy: Option<String>,
pub firewall_incomplete_reason: Option<String>,
pub created_at: String,
pub updated_at: String,
pub logs: Vec<ArcSessionLogEntry>,
}Expand description
ArcSession : A session log. Other than firewall_enabled (always present), firewall_* fields are only present when AI Firewall ran on a request in this session. They’re absent (not merely empty) otherwise, so their absence and an empty value mean different things.
Fields§
§id: StringThe unique identifier of the session.
virtual_key_id: StringThe ID of the virtual key used for this session.
virtual_key_name: Option<String>The display name of the virtual key used for this session.
model: StringThe AI model identifier used.
provider: StringThe name of the provider connection that ultimately served the session.
provider_connection_id: StringThe ID of the provider connection that ultimately served the session.
primary_provider: Option<String>The ID of the provider connection originally requested, before any failover occurred.
requests: i32The number of requests made in this session.
input_tokens: i32The total input tokens consumed in this session.
output_tokens: i32The total output tokens generated in this session.
violations: i32The number of AI Firewall violations detected in this session.
firewall_enabled: boolWhether AI Firewall was enabled for this session’s virtual key.
firewall_outcome: Option<String>The outcome AI Firewall reached for this session. Present only when AI Firewall ran.
firewall_stage: Option<String>The AI Firewall stage that produced the outcome (for example, the request or response stage). Present only when AI Firewall ran.
firewall_policy: Option<String>The AI Firewall policy that was applied. Present only when AI Firewall ran.
firewall_incomplete_reason: Option<String>Why AI Firewall inspection was incomplete, if applicable. Present only when AI Firewall ran and inspection didn’t complete.
created_at: StringThe date and time the session was created, in RFC 3339 format.
updated_at: StringThe date and time the session was last updated, in RFC 3339 format.
logs: Vec<ArcSessionLogEntry>The request and response pairs recorded for this session.
Implementations§
Source§impl ArcSession
impl ArcSession
Sourcepub fn new(
id: String,
virtual_key_id: String,
model: String,
provider: String,
provider_connection_id: String,
requests: i32,
input_tokens: i32,
output_tokens: i32,
violations: i32,
firewall_enabled: bool,
created_at: String,
updated_at: String,
logs: Vec<ArcSessionLogEntry>,
) -> ArcSession
pub fn new( id: String, virtual_key_id: String, model: String, provider: String, provider_connection_id: String, requests: i32, input_tokens: i32, output_tokens: i32, violations: i32, firewall_enabled: bool, created_at: String, updated_at: String, logs: Vec<ArcSessionLogEntry>, ) -> ArcSession
A session log. Other than firewall_enabled (always present), firewall_* fields are only present when AI Firewall ran on a request in this session. They’re absent (not merely empty) otherwise, so their absence and an empty value mean different things.