pub trait CompletionProvider: Send + Sync {
// Provided methods
fn complete_prompt<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
prompt_name: &'life1 str,
argument_name: &'life2 str,
argument_value: &'life3 str,
) -> Pin<Box<dyn Future<Output = Vec<CompletionValue>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
fn complete_resource<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
uri: &'life1 str,
argument_name: &'life2 str,
argument_value: &'life3 str,
) -> Pin<Box<dyn Future<Output = Vec<CompletionValue>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
fn max_completions(&self) -> usize { ... }
}Expand description
Trait for providing completion suggestions
Implement this trait to provide custom completion logic for prompts and resources.
Provided Methods§
Sourcefn complete_prompt<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
prompt_name: &'life1 str,
argument_name: &'life2 str,
argument_value: &'life3 str,
) -> Pin<Box<dyn Future<Output = Vec<CompletionValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn complete_prompt<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
prompt_name: &'life1 str,
argument_name: &'life2 str,
argument_value: &'life3 str,
) -> Pin<Box<dyn Future<Output = Vec<CompletionValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Sourcefn complete_resource<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
uri: &'life1 str,
argument_name: &'life2 str,
argument_value: &'life3 str,
) -> Pin<Box<dyn Future<Output = Vec<CompletionValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn complete_resource<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
uri: &'life1 str,
argument_name: &'life2 str,
argument_value: &'life3 str,
) -> Pin<Box<dyn Future<Output = Vec<CompletionValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Sourcefn max_completions(&self) -> usize
fn max_completions(&self) -> usize
Maximum completions to return (default: 100)