Skip to main content

LlmGenerateAdapter

Trait LlmGenerateAdapter 

pub trait LlmGenerateAdapter: Send + Sync {
    // Required method
    fn generate(
        &self,
        system: Option<&str>,
        prompt: &str,
    ) -> Result<String, String>;
}
Expand description

Injected seam that performs the actual model call. Synchronous because SopCapability::execute is sync; implementations bridge to their async provider themselves (see ProviderLlmAdapter).

Required Methods§

Source

fn generate(&self, system: Option<&str>, prompt: &str) -> Result<String, String>

Run one bounded generation. Returns the model text or a human-readable error.

Implementors§