Skip to main content

chat_core/chat/
state.rs

1pub struct NoModel;
2pub struct WithModel<P>(pub(crate) P);
3
4pub struct Unstructured;
5pub struct Structured<T>(pub(crate) std::marker::PhantomData<T>);
6pub struct Streamed;
7pub struct Embedded;
8
9/// Type-state marker for a `Chat` that streams *both* outputs and inputs.
10/// Built via [`ChatBuilder::with_input_stream`]. Gates the
11/// `Chat<CP, InputStreamed<I>>::stream(&mut messages, input)` method,
12/// which interleaves the model's output stream with a caller-supplied
13/// `Stream<Item = PartEnum>` input source.
14pub struct InputStreamed<I>(pub(crate) std::marker::PhantomData<fn() -> I>);