Trait swiftide::indexing::SimplePrompt
source · pub trait SimplePrompt:
Debug
+ Send
+ Sync {
// Required method
fn prompt<'life0, 'async_trait>(
&'life0 self,
prompt: Prompt,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
}Expand description
Given a string prompt, queries an LLM
Required Methods§
fn prompt<'life0, 'async_trait>(
&'life0 self,
prompt: Prompt,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Implementors§
impl SimplePrompt for AwsBedrock
impl SimplePrompt for Groq
The SimplePrompt trait defines a method for sending a prompt to an AI model and receiving a response.
impl SimplePrompt for Ollama
The SimplePrompt trait defines a method for sending a prompt to an AI model and receiving a response.
impl SimplePrompt for OpenAI
The SimplePrompt trait defines a method for sending a prompt to an AI model and receiving a response.