Skip to main content

build_context

Function build_context 

Source
pub async fn build_context(
    service: &Arc<MemoryService>,
    query: &str,
    user_ctx: &UserContext,
    agent_id: Option<&str>,
    session_id: Option<&str>,
    model_id: &str,
) -> String
Expand description

Assembles a formatted memory context block for injection into a system prompt.

This is a convenience wrapper around build_context_with_hits for callers that do not need the raw memory hits.