Skip to main content

CoreContentGenerator

Trait CoreContentGenerator 

Source
pub trait CoreContentGenerator: Send + Sync {
    // Required method
    fn generate_content<'life0, 'async_trait>(
        &'life0 self,
        request: GenerateContentRequest,
    ) -> Pin<Box<dyn Future<Output = Result<GenerateContentResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A host-provided handler for the GenerateContent capability shape. Implemented by the embedding Pact framework and registered via register_core_content_generator.

Required Methods§

Source

fn generate_content<'life0, 'async_trait>( &'life0 self, request: GenerateContentRequest, ) -> Pin<Box<dyn Future<Output = Result<GenerateContentResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Generate contents using the provided generators.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§