Trait GptFunctionHolder

Source
pub trait GptFunctionHolder: Send + Sync {
    // Required method
    fn try_invoke<'life0, 'life1, 'async_trait>(
        &'life0 self,
        args: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait that indicates a callable GPT Function. Should not be implemented directly, see GptFunction instead.

Required Methods§

Source

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

Attempts to invoke this function and returns the result.

Implementors§