use sim_codec_chat::validate_chat_transcript;
use sim_kernel::{Expr, Result};
#[derive(Clone, Debug, PartialEq)]
pub struct ChatTranscript {
expr: Expr,
}
impl ChatTranscript {
pub fn new(expr: Expr) -> Result<Self> {
validate_chat_transcript(&expr)?;
Ok(Self { expr })
}
pub fn expr(&self) -> &Expr {
&self.expr
}
pub fn into_expr(self) -> Expr {
self.expr
}
}
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct OpenAiCodecOptions {
pub model: String,
pub stream: bool,
pub tools: bool,
}
impl OpenAiCodecOptions {
pub fn new(model: impl Into<String>, stream: bool, tools: bool) -> Self {
Self {
model: model.into(),
stream,
tools,
}
}
}
pub type OpenAiRequestOptions = OpenAiCodecOptions;