Skip to main content

extract_topic

Function extract_topic 

Source
pub fn extract_topic(
    title: Option<&str>,
    first_user_message: Option<&str>,
) -> String
Expand description

Extract a topic from conversation content.

Priority order:

  1. Explicit title (if provided)
  2. First user message (truncated, cleaned)
  3. Fallback to “session”