#[derive(Debug, Clone)]
pub struct GenerateRequest {
pub prompt: String,
pub persona: Option<String>,
pub instructions: Option<String>,
pub memory: Option<String>,
}
impl GenerateRequest {
pub fn new(prompt: impl Into<String>) -> Self {
Self {
prompt: prompt.into(),
persona: None,
instructions: None,
memory: None,
}
}
pub fn with_persona(mut self, persona: impl Into<String>) -> Self {
self.persona = Some(persona.into());
self
}
pub fn with_instructions(mut self, instructions: impl Into<String>) -> Self {
self.instructions = Some(instructions.into());
self
}
pub fn with_memory(mut self, memory: impl Into<String>) -> Self {
self.memory = Some(memory.into());
self
}
}