28 lines
541 B
Rust
28 lines
541 B
Rust
//! Structured output generation with schema validation
|
|
|
|
/// Output schema definition
|
|
#[derive(Debug, Clone)]
|
|
pub struct OutputSchema {
|
|
pub name: String,
|
|
pub schema: String,
|
|
}
|
|
|
|
/// Validation result
|
|
#[derive(Debug, Clone)]
|
|
pub struct ValidationResult {
|
|
pub valid: bool,
|
|
pub errors: Vec<String>,
|
|
}
|
|
|
|
/// Structured output generator
|
|
#[derive(Debug)]
|
|
pub struct StructuredGenerator {
|
|
pub name: String,
|
|
}
|
|
|
|
impl StructuredGenerator {
|
|
pub fn new(name: impl Into<String>) -> Self {
|
|
Self { name: name.into() }
|
|
}
|
|
}
|