use simple_agent_type::coercion::CoercionResult;
use simple_agent_type::prelude::CompletionResponse;
use simple_agents_healing::coercion::CoercionConfig;
use simple_agents_healing::parser::ParserConfig;
use simple_agents_healing::parser::ParserResult;
#[derive(Debug, Clone)]
pub struct HealingSettings {
pub enabled: bool,
pub parser_config: ParserConfig,
pub coercion_config: CoercionConfig,
}
impl Default for HealingSettings {
fn default() -> Self {
Self {
enabled: true,
parser_config: ParserConfig::default(),
coercion_config: CoercionConfig::default(),
}
}
}
impl HealingSettings {
pub fn new() -> Self {
Self::default()
}
pub fn disabled() -> Self {
Self {
enabled: false,
..Self::default()
}
}
pub fn with_parser_config(mut self, config: ParserConfig) -> Self {
self.parser_config = config;
self
}
pub fn with_coercion_config(mut self, config: CoercionConfig) -> Self {
self.coercion_config = config;
self
}
}
pub struct HealedJsonResponse {
pub response: CompletionResponse,
pub parsed: ParserResult,
}
pub struct HealedSchemaResponse {
pub response: CompletionResponse,
pub parsed: ParserResult,
pub coerced: CoercionResult<serde_json::Value>,
}