DynStructuredPrompt

Trait DynStructuredPrompt 

Source
pub trait DynStructuredPrompt:
    Debug
    + Send
    + Sync
    + DynClone {
    // Required method
    fn structured_prompt_dyn<'life0, 'async_trait>(
        &'life0 self,
        prompt: Prompt,
        schema: Schema,
    ) -> Pin<Box<dyn Future<Output = Result<Value, LanguageModelError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn name(&self) -> &'static str { ... }
}
Expand description

Helper trait object to call structured prompt with dynamic dispatch

Internally Swiftide only implements this trait, as implementing DynStructuredPrompt gives StructuredPrompt for free

Required Methods§

Source

fn structured_prompt_dyn<'life0, 'async_trait>( &'life0 self, prompt: Prompt, schema: Schema, ) -> Pin<Box<dyn Future<Output = Result<Value, LanguageModelError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn name(&self) -> &'static str

Implementors§