mod chat;
mod prompt;
use std::{collections::HashMap, error::Error};
pub use chat::*;
pub use prompt::*;
use serde_json::Value;
use crate::schemas::{messages::Message, prompt::PromptValue};
pub type PromptArgs = HashMap<String, Value>;
pub trait PromptFromatter: Send + Sync {
fn template(&self) -> String;
fn variables(&self) -> Vec<String>;
fn format(&self, input_variables: PromptArgs) -> Result<String, Box<dyn Error>>;
}
pub trait MessageFormatter: Send + Sync {
fn format_messages(&self, input_variables: PromptArgs) -> Result<Vec<Message>, Box<dyn Error>>;
fn input_variables(&self) -> Vec<String>;
}
pub trait FormatPrompter: Send + Sync {
fn format_prompt(&self, input_variables: PromptArgs) -> Result<PromptValue, Box<dyn Error>>;
fn get_input_variables(&self) -> Vec<String>;
}