pub trait AgentService {
// Required methods
fn models(&self) -> Result<Value>;
fn send(&self, conversation: &str, text: &str) -> Result<u64>;
fn cancel(&self, stream: u64);
}Expand description
Models and the agent (agent.use). Tools run in the host after a
host-drawn approval; replies stream back as agent.stream chunks.
Required Methods§
fn models(&self) -> Result<Value>
Sourcefn send(&self, conversation: &str, text: &str) -> Result<u64>
fn send(&self, conversation: &str, text: &str) -> Result<u64>
Start a turn; returns a stream id.
fn cancel(&self, stream: u64)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".