Thanks to visit codestin.com
Credit goes to github.com

Skip to content

jayson-panganiban/faq-mate

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

title emoji colorFrom colorTo sdk app_port pinned secrets
FAQ Mate
🚗
blue
green
docker
7860
false
OPENAI_API_KEY

🚗 FAQ Mate - Car Insurance FAQ Chatbot

A simple chatbot that answers questions about Australian car insurance.

How it Works

  1. The Gradio interface captures the user's question.
  2. It sends the question to the FastAPI backend (/ask endpoint).
  3. The FastAPI backend:
    • Uses OpenAI embeddings to find relevant FAQs from data/faqs.json.
    • Uses an OpenAI chat model to synthesize an answer based on the relevant FAQs.
    • Returns the synthesized answer, confidence score, and source information.
  4. The Gradio interface displays the answer to the user.

Configuration

  • SDK: Docker
  • Application Port: 7860 (Gradio interface)
  • Secrets: Requires an OPENAI_API_KEY to be set in the Space secrets. Add your OpenAI API key in the Space settings under "Secrets".

Running Locally (Optional)

  1. Build the Docker image:

    docker build -t faq-mate .
  2. Run the Docker container:

    docker run -p 7860:7860 -p 8000:8000 -e OPENAI_API_KEY="your_openai_api_key" faq-mate

    Replace "your_openai_api_key" with your actual key.

    • Access the Gradio UI at http://localhost:7860
    • Access the FastAPI docs at http://localhost:8000/docs

About

RAG assistant that answers Australian car insurance FAQs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.1%
  • Dockerfile 0.9%