Skip to main content

AnalysisBackend

Trait AnalysisBackend 

Source
pub trait AnalysisBackend {
    // Required method
    fn execute(
        &self,
        prompt: &str,
        json_schema: Option<&str>,
    ) -> Result<BackendResponse, CoreError>;
}
Expand description

Trait for AI analysis backends. Sync only — no async.

Required Methods§

Source

fn execute( &self, prompt: &str, json_schema: Option<&str>, ) -> Result<BackendResponse, CoreError>

Execute a prompt and return the response text and cost. When json_schema is provided, the backend passes it to --json-schema for constrained decoding (guaranteed valid JSON matching the schema).

Implementors§