rag-module 0.6.7

Enterprise RAG module with chat context storage, vector search, session management, and model downloading. Rust implementation with Node.js compatibility.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use anyhow::Result;

/// Validate user input
pub fn validate_user_id(user_id: &str) -> Result<()> {
    if user_id.is_empty() {
        return Err(anyhow::anyhow!("User ID cannot be empty"));
    }
    Ok(())
}

/// Validate session ID
pub fn validate_session_id(session_id: &str) -> Result<()> {
    if session_id.is_empty() {
        return Err(anyhow::anyhow!("Session ID cannot be empty"));
    }
    Ok(())
}