/langchain_virtual_assistant

Chatbot using langchain, websocket, fastAPI

Primary LanguagePythonMIT LicenseMIT

🦜️🔗 ChatLangChain

This repo is an implementation of a locally hosted chatbot specifically focused on question answering over the LangChain documentation. It is ingested with information about the bitcoin law in El Salvador for demostration purposes. Built with LangChain and FastAPI.

The app leverages LangChain's streaming support and async API to update the page in real time for multiple users.

✅ Credentials

  1. Remeber to get a API-key from openai and save it in credentials.env

✅ Running with container

  1. docker compose --env-file credentials.env up

✅ Running locally

  1. Install dependencies: pip install -r requirements.txt
  2. Verify that you have the openai API-KEY in credentials.env file
  3. Run the app: uvicorn src.api.main:app --reload --port 9001
  4. Open localhost:9001 in your browser.