tiny_loop/llm.rs
1mod openai;
2
3use crate::types::{LLMResponse, Message, ToolDefinition};
4use async_trait::async_trait;
5
6pub use openai::*;
7
8/// LLM provider trait for making API calls
9#[async_trait]
10pub trait LLMProvider: Send + Sync {
11 /// Call the LLM with messages and available tools, returning the assistant's response
12 async fn call(
13 &mut self,
14 messages: &[Message],
15 tools: &[ToolDefinition],
16 ) -> anyhow::Result<LLMResponse>;
17}