modelsocket 0.4.5

A Rust library for ModelSocket, a protocol for efficiently integrating with LLMs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::protocol::{MSEvent, MSRequest};
use crate::ModelSocketError;
use futures::{Sink, Stream};

pub mod ws;

pub trait MSTransport<RX, TX>
where
    RX: Stream<Item = Result<MSEvent, ModelSocketError>>,
    TX: Sink<MSRequest>,
{
    fn split(self) -> (TX, RX);
}