use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum SseTypes {
#[serde(rename = "conversation.response.started")]
ConversationResponseStarted,
#[serde(rename = "conversation.response.done")]
ConversationResponseDone,
#[serde(rename = "conversation.response.error")]
ConversationResponseError,
#[serde(rename = "message.output.delta")]
MessageOutputDelta,
#[serde(rename = "tool.execution.started")]
ToolExecutionStarted,
#[serde(rename = "tool.execution.delta")]
ToolExecutionDelta,
#[serde(rename = "tool.execution.done")]
ToolExecutionDone,
#[serde(rename = "agent.handoff.started")]
AgentHandoffStarted,
#[serde(rename = "agent.handoff.done")]
AgentHandoffDone,
#[serde(rename = "function.call.delta")]
FunctionCallDelta,
}
impl std::fmt::Display for SseTypes {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::ConversationResponseStarted => write!(f, "conversation.response.started"),
Self::ConversationResponseDone => write!(f, "conversation.response.done"),
Self::ConversationResponseError => write!(f, "conversation.response.error"),
Self::MessageOutputDelta => write!(f, "message.output.delta"),
Self::ToolExecutionStarted => write!(f, "tool.execution.started"),
Self::ToolExecutionDelta => write!(f, "tool.execution.delta"),
Self::ToolExecutionDone => write!(f, "tool.execution.done"),
Self::AgentHandoffStarted => write!(f, "agent.handoff.started"),
Self::AgentHandoffDone => write!(f, "agent.handoff.done"),
Self::FunctionCallDelta => write!(f, "function.call.delta"),
}
}
}
impl Default for SseTypes {
fn default() -> SseTypes {
Self::ConversationResponseStarted
}
}