#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentDevMessage {
#[prost(oneof = "agent_dev_message::Message", tags = "1, 2, 3")]
pub message: ::core::option::Option<agent_dev_message::Message>,
}
pub mod agent_dev_message {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Message {
#[prost(message, tag = "1")]
GetRunningJobsRequest(super::GetRunningAgentJobsRequest),
#[prost(message, tag = "2")]
GetRunningJobsResponse(super::GetRunningAgentJobsResponse),
#[prost(message, tag = "3")]
ServerInfo(super::ServerInfo),
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ServerInfo {
#[prost(string, tag = "1")]
pub agent_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub url: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetRunningAgentJobsRequest {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRunningAgentJobsResponse {
#[prost(message, repeated, tag = "1")]
pub jobs: ::prost::alloc::vec::Vec<RunningAgentJobInfo>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RunningAgentJobInfo {
#[prost(bytes = "vec", tag = "1")]
pub job: ::prost::alloc::vec::Vec<u8>,
#[prost(string, tag = "2")]
pub accept_name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub accept_identity: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub accept_metadata: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub url: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub token: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub worker_id: ::prost::alloc::string::String,
#[prost(bool, tag = "8")]
pub mock_job: bool,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MetricsReport {
#[prost(message, optional, tag = "1")]
pub started_speaking_at: ::core::option::Option<::pbjson_types::Timestamp>,
#[prost(message, optional, tag = "2")]
pub stopped_speaking_at: ::core::option::Option<::pbjson_types::Timestamp>,
#[prost(double, optional, tag = "3")]
pub transcription_delay: ::core::option::Option<f64>,
#[prost(double, optional, tag = "4")]
pub end_of_turn_delay: ::core::option::Option<f64>,
#[prost(double, optional, tag = "5")]
pub on_user_turn_completed_delay: ::core::option::Option<f64>,
#[prost(double, optional, tag = "6")]
pub llm_node_ttft: ::core::option::Option<f64>,
#[prost(double, optional, tag = "7")]
pub tts_node_ttfb: ::core::option::Option<f64>,
#[prost(double, optional, tag = "8")]
pub e2e_latency: ::core::option::Option<f64>,
#[prost(double, optional, tag = "9")]
pub llm_node_tps: ::core::option::Option<f64>,
#[prost(double, optional, tag = "10")]
pub llm_node_ttfs: ::core::option::Option<f64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimedString {
#[prost(string, tag = "1")]
pub text: ::prost::alloc::string::String,
#[prost(double, optional, tag = "2")]
pub start_time: ::core::option::Option<f64>,
#[prost(double, optional, tag = "3")]
pub end_time: ::core::option::Option<f64>,
#[prost(double, optional, tag = "4")]
pub confidence: ::core::option::Option<f64>,
#[prost(double, optional, tag = "5")]
pub start_time_offset: ::core::option::Option<f64>,
#[prost(string, optional, tag = "6")]
pub speaker_id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChatMessage {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(enumeration = "ChatRole", tag = "2")]
pub role: i32,
#[prost(message, repeated, tag = "3")]
pub content: ::prost::alloc::vec::Vec<chat_message::ChatContent>,
#[prost(bool, tag = "4")]
pub interrupted: bool,
#[prost(double, optional, tag = "5")]
pub transcript_confidence: ::core::option::Option<f64>,
#[prost(map = "string, string", tag = "6")]
pub extra: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
#[prost(message, optional, tag = "7")]
pub metrics: ::core::option::Option<MetricsReport>,
#[prost(message, optional, tag = "8")]
pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
}
pub mod chat_message {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ChatContent {
#[prost(oneof = "chat_content::Payload", tags = "1")]
pub payload: ::core::option::Option<chat_content::Payload>,
}
pub mod chat_content {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Payload {
#[prost(string, tag = "1")]
Text(::prost::alloc::string::String),
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FunctionCall {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub call_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub arguments: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
#[prost(map = "string, string", tag = "6")]
pub extra: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FunctionCallOutput {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub call_id: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub output: ::prost::alloc::string::String,
#[prost(bool, tag = "5")]
pub is_error: bool,
#[prost(message, optional, tag = "6")]
pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AgentHandoff {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub old_agent_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, tag = "3")]
pub new_agent_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AgentConfigUpdate {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub instructions: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "3")]
pub tools_added: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "4")]
pub tools_removed: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "5")]
pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChatContext {
#[prost(message, repeated, tag = "1")]
pub items: ::prost::alloc::vec::Vec<chat_context::ChatItem>,
}
pub mod chat_context {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChatItem {
#[prost(oneof = "chat_item::Item", tags = "1, 2, 3, 4, 5")]
pub item: ::core::option::Option<chat_item::Item>,
}
pub mod chat_item {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Item {
#[prost(message, tag = "1")]
Message(super::super::ChatMessage),
#[prost(message, tag = "2")]
FunctionCall(super::super::FunctionCall),
#[prost(message, tag = "3")]
FunctionCallOutput(super::super::FunctionCallOutput),
#[prost(message, tag = "4")]
AgentHandoff(super::super::AgentHandoff),
#[prost(message, tag = "5")]
AgentConfigUpdate(super::super::AgentConfigUpdate),
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LlmModelUsage {
#[prost(string, tag = "1")]
pub provider: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub model: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub input_tokens: i32,
#[prost(int32, tag = "4")]
pub input_cached_tokens: i32,
#[prost(int32, tag = "5")]
pub input_audio_tokens: i32,
#[prost(int32, tag = "6")]
pub input_cached_audio_tokens: i32,
#[prost(int32, tag = "7")]
pub input_text_tokens: i32,
#[prost(int32, tag = "8")]
pub input_cached_text_tokens: i32,
#[prost(int32, tag = "9")]
pub input_image_tokens: i32,
#[prost(int32, tag = "10")]
pub input_cached_image_tokens: i32,
#[prost(int32, tag = "11")]
pub output_tokens: i32,
#[prost(int32, tag = "12")]
pub output_audio_tokens: i32,
#[prost(int32, tag = "13")]
pub output_text_tokens: i32,
#[prost(double, tag = "14")]
pub session_duration: f64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TtsModelUsage {
#[prost(string, tag = "1")]
pub provider: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub model: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub input_tokens: i32,
#[prost(int32, tag = "4")]
pub output_tokens: i32,
#[prost(int32, tag = "5")]
pub characters_count: i32,
#[prost(double, tag = "6")]
pub audio_duration: f64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SttModelUsage {
#[prost(string, tag = "1")]
pub provider: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub model: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub input_tokens: i32,
#[prost(int32, tag = "4")]
pub output_tokens: i32,
#[prost(double, tag = "5")]
pub audio_duration: f64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct InterruptionModelUsage {
#[prost(string, tag = "1")]
pub provider: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub model: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub total_requests: i32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct EotModelUsage {
#[prost(string, tag = "1")]
pub provider: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub model: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub total_requests: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelUsage {
#[prost(oneof = "model_usage::Usage", tags = "1, 2, 3, 4, 5")]
pub usage: ::core::option::Option<model_usage::Usage>,
}
pub mod model_usage {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Usage {
#[prost(message, tag = "1")]
Llm(super::LlmModelUsage),
#[prost(message, tag = "2")]
Tts(super::TtsModelUsage),
#[prost(message, tag = "3")]
Stt(super::SttModelUsage),
#[prost(message, tag = "4")]
Interruption(super::InterruptionModelUsage),
#[prost(message, tag = "5")]
Eot(super::EotModelUsage),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentSessionUsage {
#[prost(message, repeated, tag = "1")]
pub model_usage: ::prost::alloc::vec::Vec<ModelUsage>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DebugMessage {
#[prost(message, optional, tag = "1")]
pub payload: ::core::option::Option<::pbjson_types::Struct>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentSessionEvent {
#[prost(message, optional, tag = "1")]
pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
#[prost(oneof = "agent_session_event::Event", tags = "10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23")]
pub event: ::core::option::Option<agent_session_event::Event>,
}
pub mod agent_session_event {
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AgentStateChanged {
#[prost(enumeration = "super::AgentState", tag = "1")]
pub old_state: i32,
#[prost(enumeration = "super::AgentState", tag = "2")]
pub new_state: i32,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UserStateChanged {
#[prost(enumeration = "super::UserState", tag = "1")]
pub old_state: i32,
#[prost(enumeration = "super::UserState", tag = "2")]
pub new_state: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConversationItemAdded {
#[prost(message, optional, tag = "1")]
pub item: ::core::option::Option<super::chat_context::ChatItem>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UserInputTranscribed {
#[prost(string, tag = "1")]
pub transcript: ::prost::alloc::string::String,
#[prost(bool, tag = "2")]
pub is_final: bool,
#[prost(string, optional, tag = "3")]
pub language: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FunctionToolsStarted {
#[prost(message, repeated, tag = "1")]
pub function_calls: ::prost::alloc::vec::Vec<super::FunctionCall>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FunctionToolsExecuted {
#[prost(message, repeated, tag = "1")]
pub function_calls: ::prost::alloc::vec::Vec<super::FunctionCall>,
#[prost(message, repeated, tag = "2")]
pub function_call_outputs: ::prost::alloc::vec::Vec<super::FunctionCallOutput>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Error {
#[prost(string, tag = "1")]
pub message: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct OverlappingSpeech {
#[prost(bool, tag = "1")]
pub is_interruption: bool,
#[prost(message, optional, tag = "2")]
pub overlap_started_at: ::core::option::Option<::pbjson_types::Timestamp>,
#[prost(double, tag = "3")]
pub detection_delay: f64,
#[prost(message, optional, tag = "4")]
pub detected_at: ::core::option::Option<::pbjson_types::Timestamp>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AmdPrediction {
#[prost(message, optional, tag = "1")]
pub speech_duration: ::core::option::Option<::pbjson_types::Duration>,
#[prost(enumeration = "super::AmdCategory", tag = "2")]
pub category: i32,
#[prost(string, tag = "3")]
pub reason: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub transcript: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub delay: ::core::option::Option<::pbjson_types::Duration>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct EotPrediction {
#[prost(float, tag = "1")]
pub probability: f32,
#[prost(float, tag = "2")]
pub threshold: f32,
#[prost(message, optional, tag = "3")]
pub inference_duration: ::core::option::Option<::pbjson_types::Duration>,
#[prost(message, optional, tag = "4")]
pub delay: ::core::option::Option<::pbjson_types::Duration>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SessionUsageUpdated {
#[prost(message, optional, tag = "1")]
pub usage: ::core::option::Option<super::AgentSessionUsage>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ToolExecutionUpdated {
#[prost(oneof = "tool_execution_updated::Update", tags = "1, 2, 3, 4")]
pub update: ::core::option::Option<tool_execution_updated::Update>,
}
pub mod tool_execution_updated {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Started {
#[prost(message, optional, tag = "1")]
pub function_call: ::core::option::Option<super::super::FunctionCall>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CallUpdated {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub call_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub message: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Ended {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub call_id: ::prost::alloc::string::String,
#[prost(string, optional, tag = "3")]
pub message: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration = "super::super::ToolCallStatus", tag = "4")]
pub status: i32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReplyUpdated {
#[prost(string, repeated, tag = "1")]
pub update_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(enumeration = "super::super::ToolReplyStatus", tag = "2")]
pub status: i32,
#[prost(string, tag = "3")]
pub speech_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Update {
#[prost(message, tag = "1")]
Started(Started),
#[prost(message, tag = "2")]
CallUpdated(CallUpdated),
#[prost(message, tag = "3")]
ReplyUpdated(ReplyUpdated),
#[prost(message, tag = "4")]
Ended(Ended),
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AgentFalseInterruption {
#[prost(bool, tag = "1")]
pub resumed: bool,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Event {
#[prost(message, tag = "10")]
AgentStateChanged(AgentStateChanged),
#[prost(message, tag = "11")]
UserStateChanged(UserStateChanged),
#[prost(message, tag = "12")]
ConversationItemAdded(ConversationItemAdded),
#[prost(message, tag = "13")]
UserInputTranscribed(UserInputTranscribed),
#[prost(message, tag = "14")]
FunctionToolsExecuted(FunctionToolsExecuted),
#[prost(message, tag = "15")]
Error(Error),
#[prost(message, tag = "16")]
OverlappingSpeech(OverlappingSpeech),
#[prost(message, tag = "17")]
SessionUsageUpdated(SessionUsageUpdated),
#[prost(message, tag = "18")]
AmdPrediction(AmdPrediction),
#[prost(message, tag = "19")]
EotPrediction(EotPrediction),
#[prost(message, tag = "20")]
FunctionToolsStarted(FunctionToolsStarted),
#[prost(message, tag = "21")]
DebugMessage(super::DebugMessage),
#[prost(message, tag = "22")]
ToolExecutionUpdated(ToolExecutionUpdated),
#[prost(message, tag = "23")]
AgentFalseInterruption(AgentFalseInterruption),
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SessionRequest {
#[prost(string, tag = "1")]
pub request_id: ::prost::alloc::string::String,
#[prost(oneof = "session_request::Request", tags = "2, 4, 5, 6, 7, 8, 9, 10, 11, 12")]
pub request: ::core::option::Option<session_request::Request>,
}
pub mod session_request {
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Ping {
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetChatHistory {
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RunInput {
#[prost(string, tag = "1")]
pub text: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetAgentInfo {
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetSessionState {
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetRtcStats {
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetSessionUsage {
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetFrameworkInfo {
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateIo {
#[prost(message, optional, tag = "1")]
pub input: ::core::option::Option<update_io::Input>,
#[prost(message, optional, tag = "2")]
pub output: ::core::option::Option<update_io::Output>,
}
pub mod update_io {
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Input {
#[prost(bool, optional, tag = "1")]
pub audio_enabled: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "2")]
pub video_enabled: ::core::option::Option<bool>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Output {
#[prost(bool, optional, tag = "1")]
pub audio_enabled: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "2")]
pub video_enabled: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "3")]
pub transcription_enabled: ::core::option::Option<bool>,
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FinalizeSimulation {
#[prost(bool, tag = "1")]
pub provisional_success: bool,
#[prost(string, tag = "2")]
pub provisional_reason: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Request {
#[prost(message, tag = "2")]
Ping(Ping),
#[prost(message, tag = "4")]
GetChatHistory(GetChatHistory),
#[prost(message, tag = "5")]
RunInput(RunInput),
#[prost(message, tag = "6")]
GetAgentInfo(GetAgentInfo),
#[prost(message, tag = "7")]
GetSessionState(GetSessionState),
#[prost(message, tag = "8")]
GetRtcStats(GetRtcStats),
#[prost(message, tag = "9")]
GetSessionUsage(GetSessionUsage),
#[prost(message, tag = "10")]
GetFrameworkInfo(GetFrameworkInfo),
#[prost(message, tag = "11")]
UpdateIo(UpdateIo),
#[prost(message, tag = "12")]
FinalizeSimulation(FinalizeSimulation),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SessionResponse {
#[prost(string, tag = "1")]
pub request_id: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub error: ::core::option::Option<::prost::alloc::string::String>,
#[prost(oneof = "session_response::Response", tags = "3, 5, 6, 7, 8, 9, 10, 11, 12, 13")]
pub response: ::core::option::Option<session_response::Response>,
}
pub mod session_response {
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Pong {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetChatHistoryResponse {
#[prost(message, repeated, tag = "1")]
pub items: ::prost::alloc::vec::Vec<super::chat_context::ChatItem>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAgentInfoResponse {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub instructions: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "3")]
pub tools: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "4")]
pub chat_ctx: ::prost::alloc::vec::Vec<super::chat_context::ChatItem>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RunInputResponse {
#[prost(message, repeated, tag = "1")]
pub items: ::prost::alloc::vec::Vec<super::chat_context::ChatItem>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSessionStateResponse {
#[prost(enumeration = "super::AgentState", tag = "1")]
pub agent_state: i32,
#[prost(enumeration = "super::UserState", tag = "2")]
pub user_state: i32,
#[prost(string, tag = "3")]
pub agent_id: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "4")]
pub options: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
#[prost(message, optional, tag = "5")]
pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRtcStatsResponse {
#[prost(message, repeated, tag = "1")]
pub publisher_stats: ::prost::alloc::vec::Vec<::pbjson_types::Struct>,
#[prost(message, repeated, tag = "2")]
pub subscriber_stats: ::prost::alloc::vec::Vec<::pbjson_types::Struct>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSessionUsageResponse {
#[prost(message, optional, tag = "1")]
pub usage: ::core::option::Option<super::AgentSessionUsage>,
#[prost(message, optional, tag = "2")]
pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetFrameworkInfoResponse {
#[prost(string, tag = "1")]
pub sdk: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub sdk_version: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateIoResponse {
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FinalizeSimulationResponse {
#[prost(message, optional, tag = "1")]
pub user_verdict: ::core::option::Option<finalize_simulation_response::SimulationVerdict>,
}
pub mod finalize_simulation_response {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SimulationVerdict {
#[prost(bool, tag = "1")]
pub success: bool,
#[prost(string, tag = "2")]
pub reason: ::prost::alloc::string::String,
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "3")]
Pong(Pong),
#[prost(message, tag = "5")]
GetChatHistory(GetChatHistoryResponse),
#[prost(message, tag = "6")]
RunInput(RunInputResponse),
#[prost(message, tag = "7")]
GetAgentInfo(GetAgentInfoResponse),
#[prost(message, tag = "8")]
GetSessionState(GetSessionStateResponse),
#[prost(message, tag = "9")]
GetRtcStats(GetRtcStatsResponse),
#[prost(message, tag = "10")]
GetSessionUsage(GetSessionUsageResponse),
#[prost(message, tag = "11")]
GetFrameworkInfo(GetFrameworkInfoResponse),
#[prost(message, tag = "12")]
UpdateIo(UpdateIoResponse),
#[prost(message, tag = "13")]
FinalizeSimulation(FinalizeSimulationResponse),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentSessionMessage {
#[prost(oneof = "agent_session_message::Message", tags = "1, 2, 3, 4, 5, 6, 7, 8")]
pub message: ::core::option::Option<agent_session_message::Message>,
}
pub mod agent_session_message {
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ConsoleIo {
}
pub mod console_io {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AudioFrame {
#[prost(bytes = "vec", tag = "1")]
pub data: ::prost::alloc::vec::Vec<u8>,
#[prost(uint32, tag = "2")]
pub sample_rate: u32,
#[prost(uint32, tag = "3")]
pub num_channels: u32,
#[prost(uint32, tag = "4")]
pub samples_per_channel: u32,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AudioPlaybackFlush {
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AudioPlaybackClear {
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AudioPlaybackFinished {
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Message {
#[prost(message, tag = "1")]
AudioInput(console_io::AudioFrame),
#[prost(message, tag = "2")]
AudioOutput(console_io::AudioFrame),
#[prost(message, tag = "3")]
Event(super::AgentSessionEvent),
#[prost(message, tag = "4")]
Request(super::SessionRequest),
#[prost(message, tag = "5")]
Response(super::SessionResponse),
#[prost(message, tag = "6")]
AudioPlaybackFlush(console_io::AudioPlaybackFlush),
#[prost(message, tag = "7")]
AudioPlaybackClear(console_io::AudioPlaybackClear),
#[prost(message, tag = "8")]
AudioPlaybackFinished(console_io::AudioPlaybackFinished),
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ChatRole {
Developer = 0,
System = 1,
User = 2,
Assistant = 3,
}
impl ChatRole {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Developer => "DEVELOPER",
Self::System => "SYSTEM",
Self::User => "USER",
Self::Assistant => "ASSISTANT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DEVELOPER" => Some(Self::Developer),
"SYSTEM" => Some(Self::System),
"USER" => Some(Self::User),
"ASSISTANT" => Some(Self::Assistant),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AgentState {
AsInitializing = 0,
AsIdle = 1,
AsListening = 2,
AsThinking = 3,
AsSpeaking = 4,
}
impl AgentState {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::AsInitializing => "AS_INITIALIZING",
Self::AsIdle => "AS_IDLE",
Self::AsListening => "AS_LISTENING",
Self::AsThinking => "AS_THINKING",
Self::AsSpeaking => "AS_SPEAKING",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"AS_INITIALIZING" => Some(Self::AsInitializing),
"AS_IDLE" => Some(Self::AsIdle),
"AS_LISTENING" => Some(Self::AsListening),
"AS_THINKING" => Some(Self::AsThinking),
"AS_SPEAKING" => Some(Self::AsSpeaking),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum UserState {
UsSpeaking = 0,
UsListening = 1,
UsAway = 2,
}
impl UserState {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::UsSpeaking => "US_SPEAKING",
Self::UsListening => "US_LISTENING",
Self::UsAway => "US_AWAY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"US_SPEAKING" => Some(Self::UsSpeaking),
"US_LISTENING" => Some(Self::UsListening),
"US_AWAY" => Some(Self::UsAway),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ToolCallStatus {
TcRunning = 0,
TcDone = 1,
TcError = 2,
TcCancelled = 3,
}
impl ToolCallStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::TcRunning => "TC_RUNNING",
Self::TcDone => "TC_DONE",
Self::TcError => "TC_ERROR",
Self::TcCancelled => "TC_CANCELLED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TC_RUNNING" => Some(Self::TcRunning),
"TC_DONE" => Some(Self::TcDone),
"TC_ERROR" => Some(Self::TcError),
"TC_CANCELLED" => Some(Self::TcCancelled),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ToolReplyStatus {
TrScheduled = 0,
TrCompleted = 1,
TrInterrupted = 2,
TrSkipped = 3,
}
impl ToolReplyStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::TrScheduled => "TR_SCHEDULED",
Self::TrCompleted => "TR_COMPLETED",
Self::TrInterrupted => "TR_INTERRUPTED",
Self::TrSkipped => "TR_SKIPPED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TR_SCHEDULED" => Some(Self::TrScheduled),
"TR_COMPLETED" => Some(Self::TrCompleted),
"TR_INTERRUPTED" => Some(Self::TrInterrupted),
"TR_SKIPPED" => Some(Self::TrSkipped),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AmdCategory {
AmdUnknown = 0,
AmdHuman = 1,
AmdMachineIvr = 2,
AmdMachineVm = 3,
AmdMachineUnavailable = 4,
AmdUncertain = 5,
}
impl AmdCategory {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::AmdUnknown => "AMD_UNKNOWN",
Self::AmdHuman => "AMD_HUMAN",
Self::AmdMachineIvr => "AMD_MACHINE_IVR",
Self::AmdMachineVm => "AMD_MACHINE_VM",
Self::AmdMachineUnavailable => "AMD_MACHINE_UNAVAILABLE",
Self::AmdUncertain => "AMD_UNCERTAIN",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"AMD_UNKNOWN" => Some(Self::AmdUnknown),
"AMD_HUMAN" => Some(Self::AmdHuman),
"AMD_MACHINE_IVR" => Some(Self::AmdMachineIvr),
"AMD_MACHINE_VM" => Some(Self::AmdMachineVm),
"AMD_MACHINE_UNAVAILABLE" => Some(Self::AmdMachineUnavailable),
"AMD_UNCERTAIN" => Some(Self::AmdUncertain),
_ => None,
}
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TextMessageRequest {
#[prost(string, tag = "1")]
pub text: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub message_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub session_id: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub agent_name: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub metadata: ::prost::alloc::string::String,
#[prost(message, optional, tag = "6")]
pub session_state: ::core::option::Option<AgentSessionState>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TextMessageResponse {
#[prost(string, tag = "1")]
pub message_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub session_id: ::prost::alloc::string::String,
#[prost(oneof = "text_message_response::Event", tags = "3, 4, 5, 6, 7")]
pub event: ::core::option::Option<text_message_response::Event>,
}
pub mod text_message_response {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Event {
#[prost(message, tag = "3")]
Message(super::ChatMessage),
#[prost(message, tag = "4")]
FunctionCall(super::FunctionCall),
#[prost(message, tag = "5")]
FunctionCallOutput(super::FunctionCallOutput),
#[prost(message, tag = "6")]
AgentHandoff(super::AgentHandoff),
#[prost(message, tag = "7")]
Complete(super::TextMessageComplete),
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TextMessageComplete {
#[prost(oneof = "text_message_complete::Result", tags = "1, 2")]
pub result: ::core::option::Option<text_message_complete::Result>,
}
pub mod text_message_complete {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "1")]
SessionState(super::AgentSessionState),
#[prost(message, tag = "2")]
Error(super::TextMessageError),
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AgentSessionState {
#[prost(uint64, tag = "1")]
pub version: u64,
#[prost(oneof = "agent_session_state::Data", tags = "2, 3")]
pub data: ::core::option::Option<agent_session_state::Data>,
}
pub mod agent_session_state {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Data {
#[prost(bytes, tag = "2")]
Snapshot(::prost::alloc::vec::Vec<u8>),
#[prost(bytes, tag = "3")]
Delta(::prost::alloc::vec::Vec<u8>),
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TextMessageError {
#[prost(string, tag = "1")]
pub message: ::prost::alloc::string::String,
#[prost(enumeration = "TextMessageErrorCode", tag = "2")]
pub code: i32,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TextMessageErrorCode {
InternalError = 0,
SessionStateNotFound = 1,
TextHandlerError = 2,
ProcessClosed = 3,
}
impl TextMessageErrorCode {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::InternalError => "INTERNAL_ERROR",
Self::SessionStateNotFound => "SESSION_STATE_NOT_FOUND",
Self::TextHandlerError => "TEXT_HANDLER_ERROR",
Self::ProcessClosed => "PROCESS_CLOSED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"INTERNAL_ERROR" => Some(Self::InternalError),
"SESSION_STATE_NOT_FOUND" => Some(Self::SessionStateNotFound),
"TEXT_HANDLER_ERROR" => Some(Self::TextHandlerError),
"PROCESS_CLOSED" => Some(Self::ProcessClosed),
_ => None,
}
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AgentThread {
}
pub mod agent_thread {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateRequest {
#[prost(string, tag = "1")]
pub scope: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "2")]
pub attributes: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub idle_ttl: ::core::option::Option<::pbjson_types::Duration>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetRequest {
#[prost(string, tag = "1")]
pub thread_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListRequest {
#[prost(string, tag = "1")]
pub scope: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub page_token: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub limit: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListResponse {
#[prost(message, repeated, tag = "1")]
pub threads: ::prost::alloc::vec::Vec<Thread>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateRequest {
#[prost(string, tag = "1")]
pub thread_id: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "2")]
pub attributes: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub idle_ttl: ::core::option::Option<::pbjson_types::Duration>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteRequest {
#[prost(string, tag = "1")]
pub thread_id: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteResponse {
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetItemsRequest {
#[prost(string, tag = "1")]
pub thread_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub agent: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
#[prost(int32, tag = "4")]
pub limit: i32,
#[prost(enumeration = "SortOrder", tag = "5")]
pub sort_order: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetItemsResponse {
#[prost(message, repeated, tag = "1")]
pub items: ::prost::alloc::vec::Vec<Item>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Item {
#[prost(string, tag = "1")]
pub agent: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub seq: i64,
#[prost(string, tag = "3")]
pub message_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub item: ::core::option::Option<super::chat_context::ChatItem>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Thread {
#[prost(string, tag = "1")]
pub thread_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub scope: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "3")]
pub attributes: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
#[prost(message, optional, tag = "4")]
pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
#[prost(message, optional, tag = "5")]
pub last_active: ::core::option::Option<::pbjson_types::Timestamp>,
#[prost(message, optional, tag = "6")]
pub expires_at: ::core::option::Option<::pbjson_types::Timestamp>,
#[prost(message, optional, tag = "7")]
pub idle_ttl: ::core::option::Option<::pbjson_types::Duration>,
#[prost(string, tag = "8")]
pub database_id: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SortOrder {
Unspecified = 0,
Asc = 1,
Desc = 2,
}
impl SortOrder {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SORT_ORDER_UNSPECIFIED",
Self::Asc => "SORT_ORDER_ASC",
Self::Desc => "SORT_ORDER_DESC",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SORT_ORDER_UNSPECIFIED" => Some(Self::Unspecified),
"SORT_ORDER_ASC" => Some(Self::Asc),
"SORT_ORDER_DESC" => Some(Self::Desc),
_ => None,
}
}
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AgentTask {
}
pub mod agent_task {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetTasksRequest {
#[prost(string, tag = "1")]
pub thread_id: ::prost::alloc::string::String,
#[prost(enumeration = "Status", optional, tag = "2")]
pub status: ::core::option::Option<i32>,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
#[prost(int32, tag = "4")]
pub limit: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTasksResponse {
#[prost(message, repeated, tag = "1")]
pub tasks: ::prost::alloc::vec::Vec<Task>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Task {
#[prost(string, tag = "1")]
pub task_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub thread_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration = "Status", tag = "4")]
pub status: i32,
#[prost(message, optional, tag = "5")]
pub updated_at: ::core::option::Option<::pbjson_types::Timestamp>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Status {
Unspecified = 0,
Running = 1,
Completed = 2,
Failed = 3,
Canceled = 4,
}
impl Status {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "UNSPECIFIED",
Self::Running => "RUNNING",
Self::Completed => "COMPLETED",
Self::Failed => "FAILED",
Self::Canceled => "CANCELED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNSPECIFIED" => Some(Self::Unspecified),
"RUNNING" => Some(Self::Running),
"COMPLETED" => Some(Self::Completed),
"FAILED" => Some(Self::Failed),
"CANCELED" => Some(Self::Canceled),
_ => None,
}
}
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SessionSettings {
#[prost(uint32, tag = "1")]
pub sample_rate: u32,
#[prost(enumeration = "AudioEncoding", tag = "2")]
pub encoding: i32,
#[prost(oneof = "session_settings::TypeSettings", tags = "3, 4")]
pub type_settings: ::core::option::Option<session_settings::TypeSettings>,
}
pub mod session_settings {
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum TypeSettings {
#[prost(message, tag = "3")]
EotSettings(super::EotSettings),
#[prost(message, tag = "4")]
InterruptionSettings(super::InterruptionSettings),
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct InferenceError {
#[prost(string, tag = "1")]
pub message: ::prost::alloc::string::String,
#[prost(uint32, tag = "2")]
pub code: u32,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct EotSettings {
#[prost(message, optional, tag = "1")]
pub detection_interval: ::core::option::Option<::pbjson_types::Duration>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct InterruptionSettings {
#[prost(float, tag = "1")]
pub threshold: f32,
#[prost(uint32, tag = "2")]
pub min_frames: u32,
#[prost(message, optional, tag = "3")]
pub max_audio_duration: ::core::option::Option<::pbjson_types::Duration>,
#[prost(message, optional, tag = "4")]
pub audio_prefix_duration: ::core::option::Option<::pbjson_types::Duration>,
#[prost(message, optional, tag = "5")]
pub detection_interval: ::core::option::Option<::pbjson_types::Duration>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SessionCreate {
#[prost(message, optional, tag = "1")]
pub settings: ::core::option::Option<SessionSettings>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct InputAudio {
#[prost(bytes = "vec", tag = "1")]
pub audio: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "2")]
pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
#[prost(uint32, tag = "3")]
pub num_samples: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EotInputChatContext {
#[prost(message, repeated, tag = "1")]
pub messages: ::prost::alloc::vec::Vec<ChatMessage>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SessionFlush {
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SessionClose {
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct InferenceStart {
#[prost(string, tag = "1")]
pub request_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct InferenceStop {
#[prost(string, tag = "1")]
pub request_id: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BufferStart {
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BufferStop {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClientMessage {
#[prost(message, optional, tag = "1")]
pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
#[prost(oneof = "client_message::Message", tags = "2, 3, 4, 5, 6, 7, 8, 9, 10")]
pub message: ::core::option::Option<client_message::Message>,
}
pub mod client_message {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Message {
#[prost(message, tag = "2")]
SessionCreate(super::SessionCreate),
#[prost(message, tag = "3")]
InputAudio(super::InputAudio),
#[prost(message, tag = "4")]
SessionFlush(super::SessionFlush),
#[prost(message, tag = "5")]
SessionClose(super::SessionClose),
#[prost(message, tag = "6")]
InferenceStart(super::InferenceStart),
#[prost(message, tag = "7")]
InferenceStop(super::InferenceStop),
#[prost(message, tag = "8")]
BufferStart(super::BufferStart),
#[prost(message, tag = "9")]
BufferStop(super::BufferStop),
#[prost(message, tag = "10")]
EotInputChatContext(super::EotInputChatContext),
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct EotInferenceRequest {
#[prost(bytes = "vec", tag = "1")]
pub audio: ::prost::alloc::vec::Vec<u8>,
#[prost(string, tag = "2")]
pub assistant_text: ::prost::alloc::string::String,
#[prost(enumeration = "AudioEncoding", tag = "3")]
pub encoding: i32,
#[prost(uint32, tag = "4")]
pub sample_rate: u32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct InterruptionInferenceRequest {
#[prost(bytes = "vec", tag = "1")]
pub audio: ::prost::alloc::vec::Vec<u8>,
#[prost(enumeration = "AudioEncoding", tag = "2")]
pub encoding: i32,
#[prost(uint32, tag = "3")]
pub sample_rate: u32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct InferenceRequest {
#[prost(oneof = "inference_request::Request", tags = "1, 2")]
pub request: ::core::option::Option<inference_request::Request>,
}
pub mod inference_request {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Request {
#[prost(message, tag = "1")]
EotInferenceRequest(super::EotInferenceRequest),
#[prost(message, tag = "2")]
InterruptionInferenceRequest(super::InterruptionInferenceRequest),
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct InferenceStats {
#[prost(message, optional, tag = "1")]
pub earliest_client_created_at: ::core::option::Option<::pbjson_types::Timestamp>,
#[prost(message, optional, tag = "2")]
pub latest_client_created_at: ::core::option::Option<::pbjson_types::Timestamp>,
#[prost(message, optional, tag = "3")]
pub client_e2e_latency: ::core::option::Option<::pbjson_types::Duration>,
#[prost(message, optional, tag = "4")]
pub server_e2e_latency: ::core::option::Option<::pbjson_types::Duration>,
#[prost(message, optional, tag = "5")]
pub preprocessing_duration: ::core::option::Option<::pbjson_types::Duration>,
#[prost(message, optional, tag = "6")]
pub inference_duration: ::core::option::Option<::pbjson_types::Duration>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct EotInferenceResponse {
#[prost(float, tag = "1")]
pub probability: f32,
#[prost(message, optional, tag = "2")]
pub stats: ::core::option::Option<InferenceStats>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InterruptionInferenceResponse {
#[prost(bool, tag = "1")]
pub is_interruption: bool,
#[prost(float, repeated, tag = "2")]
pub probabilities: ::prost::alloc::vec::Vec<f32>,
#[prost(message, optional, tag = "3")]
pub stats: ::core::option::Option<InferenceStats>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InferenceResponse {
#[prost(oneof = "inference_response::Response", tags = "1, 2")]
pub response: ::core::option::Option<inference_response::Response>,
}
pub mod inference_response {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "1")]
EotInferenceResponse(super::EotInferenceResponse),
#[prost(message, tag = "2")]
InterruptionInferenceResponse(super::InterruptionInferenceResponse),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SessionCreated {
#[prost(map = "string, float", tag = "1")]
pub default_thresholds: ::std::collections::HashMap<::prost::alloc::string::String, f32>,
#[prost(float, tag = "2")]
pub default_threshold: f32,
#[prost(map = "string, float", tag = "3")]
pub default_backchannel_thresholds: ::std::collections::HashMap<::prost::alloc::string::String, f32>,
#[prost(float, tag = "4")]
pub default_backchannel_threshold: f32,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct InferenceStarted {
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct InferenceStopped {
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SessionClosed {
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct EotPrediction {
#[prost(float, tag = "1")]
pub probability: f32,
#[prost(message, optional, tag = "2")]
pub inference_stats: ::core::option::Option<InferenceStats>,
#[prost(enumeration = "eot_prediction::EotBackend", tag = "3")]
pub backend: i32,
#[prost(float, tag = "4")]
pub backchannel_probability: f32,
}
pub mod eot_prediction {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum EotBackend {
Unknown = 0,
Multimodal = 1,
Text = 2,
}
impl EotBackend {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unknown => "EOT_BACKEND_UNKNOWN",
Self::Multimodal => "EOT_BACKEND_MULTIMODAL",
Self::Text => "EOT_BACKEND_TEXT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"EOT_BACKEND_UNKNOWN" => Some(Self::Unknown),
"EOT_BACKEND_MULTIMODAL" => Some(Self::Multimodal),
"EOT_BACKEND_TEXT" => Some(Self::Text),
_ => None,
}
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InterruptionPrediction {
#[prost(bool, tag = "1")]
pub is_interruption: bool,
#[prost(float, repeated, tag = "2")]
pub probabilities: ::prost::alloc::vec::Vec<f32>,
#[prost(message, optional, tag = "3")]
pub inference_stats: ::core::option::Option<InferenceStats>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServerMessage {
#[prost(message, optional, tag = "1")]
pub server_created_at: ::core::option::Option<::pbjson_types::Timestamp>,
#[prost(string, optional, tag = "2")]
pub request_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub client_created_at: ::core::option::Option<::pbjson_types::Timestamp>,
#[prost(oneof = "server_message::Message", tags = "4, 5, 6, 7, 8, 9, 10")]
pub message: ::core::option::Option<server_message::Message>,
}
pub mod server_message {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Message {
#[prost(message, tag = "4")]
SessionCreated(super::SessionCreated),
#[prost(message, tag = "5")]
InferenceStarted(super::InferenceStarted),
#[prost(message, tag = "6")]
InferenceStopped(super::InferenceStopped),
#[prost(message, tag = "7")]
SessionClosed(super::SessionClosed),
#[prost(message, tag = "8")]
Error(super::InferenceError),
#[prost(message, tag = "9")]
EotPrediction(super::EotPrediction),
#[prost(message, tag = "10")]
InterruptionPrediction(super::InterruptionPrediction),
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AudioEncoding {
PcmS16le = 0,
Opus = 1,
}
impl AudioEncoding {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::PcmS16le => "AUDIO_ENCODING_PCM_S16LE",
Self::Opus => "AUDIO_ENCODING_OPUS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"AUDIO_ENCODING_PCM_S16LE" => Some(Self::PcmS16le),
"AUDIO_ENCODING_OPUS" => Some(Self::Opus),
_ => None,
}
}
}
include!("livekit.agent.serde.rs");