pub struct ChatContext {
pub messages: Vec<Message>,
pub chat_options: ChatOptions,
pub is_streaming: bool,
pub metadata: HashMap<String, Value>,
pub result: Option<ChatResponse>,
pub terminate: bool,
}Expand description
Context flowing through the chat middleware pipeline.
Fields§
§messages: Vec<Message>§chat_options: ChatOptions§is_streaming: bool§metadata: HashMap<String, Value>§result: Option<ChatResponse>§terminate: boolImplementations§
Source§impl ChatContext
impl ChatContext
pub fn new( messages: Vec<Message>, chat_options: ChatOptions, is_streaming: bool, ) -> ChatContext
Auto Trait Implementations§
impl !RefUnwindSafe for ChatContext
impl !UnwindSafe for ChatContext
impl Freeze for ChatContext
impl Send for ChatContext
impl Sync for ChatContext
impl Unpin for ChatContext
impl UnsafeUnpin for ChatContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more