pub struct ChatService<'service> {
pub sessions: &'service SessionRepository,
pub library: &'service Library,
pub workspace: &'service WorkspaceService,
pub disclosures: &'service mut DisclosureStore,
}Fields§
§sessions: &'service SessionRepository§library: &'service Library§workspace: &'service WorkspaceService§disclosures: &'service mut DisclosureStoreImplementations§
Source§impl ChatService<'_>
impl ChatService<'_>
pub fn prepare( &self, options: ChatOptions<'_>, ) -> Result<PreparedChat, ChatError>
pub fn prepare_with_prompt( &self, options: ChatOptions<'_>, system_prompt: Option<&str>, ) -> Result<PreparedChat, ChatError>
pub fn approve_disclosure(&mut self, prepared: &PreparedChat)
pub async fn run( &self, prepared: PreparedChat, harness: &dyn ChatHarness, timestamp: &str, memory: Option<(&MemoryStore, CaptureOptions<'_>)>, cancel: &CancellationToken, sink: &mut DeltaSink<'_>, ) -> Result<ChatOutcome, ChatError>
pub async fn run_agent( &self, prepared: PreparedChat, runtime: AgentRuntime<'_>, timestamp: &str, memory: Option<(&MemoryStore, CaptureOptions<'_>)>, cancel: &CancellationToken, sink: &mut EventSink<'_>, ) -> Result<ChatOutcome, ChatError>
Auto Trait Implementations§
impl<'service> !UnwindSafe for ChatService<'service>
impl<'service> Freeze for ChatService<'service>
impl<'service> RefUnwindSafe for ChatService<'service>
impl<'service> Send for ChatService<'service>
impl<'service> Sync for ChatService<'service>
impl<'service> Unpin for ChatService<'service>
impl<'service> UnsafeUnpin for ChatService<'service>
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