mesh-api 0.65.0-rc1

Public Rust SDK for embedding Mesh LLM clients in applications
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::Model;

#[derive(Debug, Clone)]
pub enum Event {
    Connecting,
    Joined { node_id: String },
    ModelsUpdated { models: Vec<Model> },
    TokenDelta { request_id: String, delta: String },
    Completed { request_id: String },
    Failed { request_id: String, error: String },
    Disconnected { reason: String },
}

pub trait EventListener: Send + Sync + 'static {
    fn on_event(&self, event: Event);
}