Skip to content

MilesQLi/VirtualCustomerServiceRepresentative

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Virtual Customer Service Representative (RAG)

Two-page web app (Admin and Chat) with a FastAPI backend using LangChain + LangGraph ReAct agent and FAISS vector store (Ollama embeddings) for retrieval augmented generation.

Prerequisites

  • Python 3.10+
  • Local OpenAI-compatible chat server at http://localhost:1234/v1 (e.g., llama.cpp server, OpenRouter local proxy, or compatible)
  • Ollama running with embeddings endpoint http://localhost:11434/v1 and the model nomic-embed-text pulled
  • Optional: PDF or TXT knowledge files to index

Install

python -m venv .venv
. .venv/Scripts/activate  # Windows PowerShell: .venv\Scripts\Activate.ps1
pip install -r requirements.txt

Run

uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

Open:

Admin Page

  • Configure:
    • LOCAL_API_BASE (default http://localhost:1234/v1)
    • LOCAL_MODEL_NAME (default gpt-oss:20b)
    • OLLAMA_LOCAL_API_BASE (default http://localhost:11434/v1)
    • EMBEDDING_MODEL_NAME (default nomic-embed-text)
    • SYSTEM_PROMPT
  • Upload and index PDF/TXT to FAISS

Admin Page

Chat Page

  • Persists a session_id locally
  • Sends messages to /api/chat which uses a LangGraph ReAct agent with a knowledge_search tool to retrieve relevant chunks from FAISS

Admin Page

Notes

  • Config is persisted to storage/config.json
  • FAISS index is stored in storage/faiss_index
  • Ensure your LLM and embedding servers are reachable before chatting or indexing

License

Apache 2.0 License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Disclaimer

This project is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

Users are responsible for checking and validating the correctness of their configuration files, safetensor files, and binary files generated using the software. The developers assume no responsibility for any errors, omissions, or other issues coming in these files, or any consequences resulting from the use of these files.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors