{"id":26368686,"url":"https://github.com/jisnap/rag_based_chatbot_api","last_synced_at":"2025-06-15T12:04:50.686Z","repository":{"id":281736456,"uuid":"946256835","full_name":"JisnaP/RAG_based_Chatbot_API","owner":"JisnaP","description":"This chatbot answers questions based on contents of a website Brainlox.com/Technical courses","archived":false,"fork":false,"pushed_at":"2025-03-10T21:31:49.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-10T22:28:34.971Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JisnaP.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-10T21:25:40.000Z","updated_at":"2025-03-10T21:31:54.000Z","dependencies_parsed_at":"2025-03-10T22:38:39.180Z","dependency_job_id":null,"html_url":"https://github.com/JisnaP/RAG_based_Chatbot_API","commit_stats":null,"previous_names":["jisnap/rag_based_chatbot_api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JisnaP%2FRAG_based_Chatbot_API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JisnaP%2FRAG_based_Chatbot_API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JisnaP%2FRAG_based_Chatbot_API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JisnaP%2FRAG_based_Chatbot_API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JisnaP","download_url":"https://codeload.github.com/JisnaP/RAG_based_Chatbot_API/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243945489,"owners_count":20372894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-16T22:48:50.737Z","updated_at":"2025-06-15T12:04:50.680Z","avatar_url":"https://github.com/JisnaP.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RAG-Based Chatbot API\n\nThis is a **Flask REST API** that implements a **Retrieval-Augmented Generation (RAG) chatbot** using FAISS for vector search and Google Generative AI for generating responses. The API retrieves relevant documents from FAISS and generates accurate answers using a Large Language Model (LLM).\n\n## Features\n- Uses **FAISS** for similarity search on stored document embeddings.\n- Utilizes **Google Generative AI** for intelligent response generation.\n- Implements **Flask-RESTful** for API development.\n- Provides structured JSON responses with retrieved document sources.\n\n---\n\n## Installation\n\n### 1️⃣ Clone the Repository\n```sh\ngit clone https://github.com/JisnaP/RAG_based_Chatbot_API.git\ncd RAG_based_Chatbot_API\n```\n\n### 2️⃣ Create a Virtual Environment (Optional but Recommended)\n```sh\npython -m venv env\nsource env/bin/activate  \n```\n\n### 3️⃣ Install Dependencies\n```sh\npip install -r requirements.txt\n```\n\n---\n\n## Usage\n\n### 1️⃣ Start the Flask Server\n```sh\npython app.py\n```\nThis runs the API on `http://localhost:8080` .\n\n### 2️⃣ Send a Request to the API\nUse **cURL**, Postman, or a Python request to interact with the chatbot.\n\n#### Example Request (cURL):\n```sh\ncurl -X POST \"http://localhost:8080/chat\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\"query\": \"What are the courses available on brainlox?\"}'\n\n\n---\n```\n## API Endpoints\n\n### `POST /chat`\n- **Request:** JSON with a `query` field.\n- **Response:** JSON containing the answer and context sources.\n```\n\n\n## Project Structure\n\nchatbot-api/\n│── chatbot/\n│   ├── data_ingestion.py  # Loads documents into FAISS index\n│   ├── embeddings.py      # Handles embeddings using Google Generative AI\n│   ├── model.py          # Loads the language model\n│── app.py               # Main Flask API\n│── requirements.txt     # Dependencies\n│── README.md            # Documentation\n\n\n---\n\n\n```\n\n\n```sh\npython chatbot/data_ingestion.py\n```\n\n---\n\n## License\nThis project is open-source under the **MIT License**.\n\n---\n\n## Author\n**Jisna Patharakkal**\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjisnap%2Frag_based_chatbot_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjisnap%2Frag_based_chatbot_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjisnap%2Frag_based_chatbot_api/lists"}