Trait PromptManager

Source
pub trait PromptManager: Send + Sync {
    // Required methods
    fn list_prompts<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Prompt>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_prompt<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Prompt>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn execute_prompt<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
        params: Option<Value>,
    ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Prompt manager trait

Required Methods§

Source

fn list_prompts<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<Prompt>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lists available prompts

Source

fn get_prompt<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Prompt>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Gets a specific prompt by ID

Source

fn execute_prompt<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, params: Option<Value>, ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Executes a prompt with given parameters

Implementors§