skate/src/provider/mod.rs
Drew Galbraith 797d7564b7 Add tool use to the orchestrator (#4)
Add tool use without sandboxing.

Currently available tools are list dir, read file, write file and exec bash.

Reviewed-on: #4
Co-authored-by: Drew Galbraith <drew@tiramisu.one>
Co-committed-by: Drew Galbraith <drew@tiramisu.one>
2026-03-02 03:00:13 +00:00

21 lines
754 B
Rust

mod claude;
pub use claude::ClaudeProvider;
use futures::Stream;
use crate::core::types::{ConversationMessage, StreamEvent, ToolDefinition};
/// Trait for model providers that can stream conversation responses.
///
/// Implementors take a conversation history and return a stream of [`StreamEvent`]s.
/// The trait is provider-agnostic -- no Claude-specific types appear here.
pub trait ModelProvider: Send + Sync {
/// Stream a response from the model given the conversation history and
/// available tool definitions. Pass an empty slice if no tools are available.
fn stream<'a>(
&'a self,
messages: &'a [ConversationMessage],
tools: &'a [ToolDefinition],
) -> impl Stream<Item = StreamEvent> + Send + 'a;
}