Skeleton for the Coding Agent. (#1)
Reviewed-on: #1 Co-authored-by: Drew Galbraith <drew@tiramisu.one> Co-committed-by: Drew Galbraith <drew@tiramisu.one>
This commit is contained in:
parent
42e3ddacc2
commit
5d213b43d3
15 changed files with 5071 additions and 12 deletions
19
src/provider/mod.rs
Normal file
19
src/provider/mod.rs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
mod claude;
|
||||
|
||||
pub use claude::ClaudeProvider;
|
||||
|
||||
use futures::Stream;
|
||||
|
||||
use crate::core::types::{ConversationMessage, StreamEvent};
|
||||
|
||||
/// 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.
|
||||
fn stream<'a>(
|
||||
&'a self,
|
||||
messages: &'a [ConversationMessage],
|
||||
) -> impl Stream<Item = StreamEvent> + Send + 'a;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue