RAG Service

RAG Service

Agentic chat with memory, retrieval, and LLM integration.

← Back to API Gateway

Documentation

Explore and test the API interactively.

Health

Basic service status.

Chat Sessions

Create and manage chat sessions (requires JWT).

  • POST /rag/chat/{partner_id}/sessions
  • GET /rag/chat/{partner_id}/sessions
  • GET /rag/chat/sessions/{session_id}/messages

Message Sending

Send messages with streaming support.

  • POST /rag/chat/sessions/{session_id}/message
  • Supports streaming (SSE) and non-streaming modes

Agentic Features

Memory and context management.

  • Automatic memory summarization
  • Token counting and context management
  • Partner personality integration
  • Retrieval-augmented generation (RAG)

LLM Integration

Powered by OpenAI and Azure OpenAI.

  • GPT-4o-mini (default)
  • Azure OpenAI support
  • LangChain integration
  • Configurable via environment variables

Database Models

PostgreSQL schema for chat data.

  • ChatSession - User chat sessions
  • ChatMessage - Individual messages
  • ChatMemory - Conversation summaries