pub mod openrouter;
pub use openrouter::OpenRouter;
use crate::error::Result;
#[derive(Debug, Clone)]
pub struct ToolSpec {
pub name: String,
pub description: String,
pub parameters: serde_json::Value,
}
#[derive(Debug, Clone)]
pub struct CompletionRequest {
pub system: String,
pub user: String,
pub tools: Vec<ToolSpec>,
}
#[derive(Debug, Clone)]
pub struct ToolCall {
pub name: String,
pub arguments: serde_json::Value,
}
#[derive(Debug, Clone, Default)]
pub struct CompletionResponse {
pub text: Option<String>,
pub tool_calls: Vec<ToolCall>,
}
pub trait Provider {
fn complete(
&self,
request: CompletionRequest,
) -> impl std::future::Future<Output = Result<CompletionResponse>> + Send;
}