PensionBot / README.md
ChAbhishek28's picture
Fix README with exact HF Spaces template format
ba4e1dd
metadata
title: PensionBot
emoji: 🎀
colorFrom: blue
colorTo: green
sdk: docker
sdk_version: latest
app_file: app.py
pinned: false

PensionBot - Voice Assistant 🎀

A sophisticated AI-powered voice assistant designed for government pension queries and document searches. Built with FastAPI, this backend provides comprehensive API endpoints for voice interaction, document processing, and intelligent responses.

πŸš€ Features

  • Voice Processing: Advanced ASR and TTS capabilities
  • Document Search: RAG-based government document knowledge base
  • Hybrid AI: Multiple LLM providers for optimal responses
  • WebSocket Support: Real-time communication
  • Authentication: JWT-based secure access

πŸ“‘ API Endpoints

  • GET / - Service information and available endpoints
  • GET /health - Health check with service status
  • POST /chat - Text-based conversation interface
  • WebSocket /ws - Real-time voice and text communication
  • GET /docs - Interactive API documentation

πŸ›  Technology Stack

  • FastAPI: High-performance web framework
  • LangChain: AI orchestration and document processing
  • LanceDB: Vector database for document search
  • Whisper: Speech-to-text processing
  • Edge-TTS: Text-to-speech synthesis

πŸ”— Usage

The API is accessible at the base URL of this space. Use the /docs endpoint to explore the interactive API documentation.

Example Usage:

# Health check
curl https://chabhishek28-pensionbot.hf.space/health

# Chat endpoint
curl -X POST https://chabhishek28-pensionbot.hf.space/chat \
  -H "Content-Type: application/json" \
  -d '{"message": "Tell me about pension policies"}'

πŸ“‹ Environment Variables

The following environment variables are required:

  • GOOGLE_API_KEY: Google Gemini API key
  • GROQ_API_KEY: Groq API key for Whisper
  • TAVILY_API_KEY: Tavily search API key
  • JWT_SECRET_KEY: JWT authentication secret

πŸ”’ Security

This API includes JWT-based authentication for secure access to protected endpoints.

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference