Expand description
High-level session helper for LLM chat comparison patterns.
ChatMemorySession wraps the low-level session/memory API into the
three-step pattern used by the playground LLM chat comparison feature:
- Create a session bound to an agent.
- Store conversation turns with
ChatMemorySession::store. - Recall relevant context before generating the next response.
§Example
use std::sync::Arc;
use dakera_client::{DakeraClient, ChatMemorySession};
let client = Arc::new(
DakeraClient::builder("http://localhost:3000")
.api_key("dk-mykey")
.build()?,
);
let session = ChatMemorySession::create(Arc::clone(&client), "chat-agent").await?;
session.store("user", "My name is Alice and I like Rust.").await?;
let context = session.recall("user preferences").await?;
// Pass context to your LLM — or skip it for the baseline comparison arm.
session.close().await?;Structs§
- Chat
Memory Session - High-level session helper for LLM chat comparison patterns.