synapto_interface/
chat.rs1use crate::plugin::Plugin;
2use crate::sync::{broadcast, mpsc};
3use async_trait::async_trait;
4
5#[async_trait]
6pub trait ChatPlugin: Plugin + Send + Sync {
7 fn channel_context_schema() -> schemars::Schema
8 where
9 Self: Sized,
10 {
11 schemars::schema_for!(())
12 }
13 async fn start(
14 &self,
15 peer_input_text_tx: mpsc::Sender<crate::peer_input_text::PeerInputText>,
16 cognitive_output_text_rx: mpsc::Receiver<crate::cognitive_output_text::CognitiveOutputText>,
17 cognitive_state_rx: broadcast::Receiver<crate::cognitive::CognitiveStateUpdate>,
18 add_document_tx: Option<mpsc::Sender<crate::document::AddDocumentRequest>>,
19 ) -> Result<(), String>;
20}