{"id":28286396,"url":"https://github.com/nazzal5448/portfolio-bot","last_synced_at":"2025-07-31T13:01:46.665Z","repository":{"id":288446973,"uuid":"968088867","full_name":"nazzal5448/portfolio-bot","owner":"nazzal5448","description":"A micro-service RAG chatbot for my portfolio website","archived":false,"fork":false,"pushed_at":"2025-04-21T06:36:24.000Z","size":378,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-10T09:05:57.902Z","etag":null,"topics":["ai","chatbot","fastapi","langchain","langchain-python","rag"],"latest_commit_sha":null,"homepage":"https://nazzalkausar.com","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/nazzal5448.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,"zenodo":null}},"created_at":"2025-04-17T13:42:33.000Z","updated_at":"2025-05-06T06:17:56.000Z","dependencies_parsed_at":"2025-06-10T09:05:59.047Z","dependency_job_id":"621864e1-fce5-4054-8064-cf48eac7175b","html_url":"https://github.com/nazzal5448/portfolio-bot","commit_stats":null,"previous_names":["nazzal5448/portfolio-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nazzal5448/portfolio-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nazzal5448%2Fportfolio-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nazzal5448%2Fportfolio-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nazzal5448%2Fportfolio-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nazzal5448%2Fportfolio-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nazzal5448","download_url":"https://codeload.github.com/nazzal5448/portfolio-bot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nazzal5448%2Fportfolio-bot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268043341,"owners_count":24186392,"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","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ai","chatbot","fastapi","langchain","langchain-python","rag"],"created_at":"2025-05-21T20:12:15.547Z","updated_at":"2025-07-31T13:01:46.567Z","avatar_url":"https://github.com/nazzal5448.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🤖 Portfolio Bot – AI Assistant for Nazzal Kausar\r\n\r\n**Xel** (aka Portfolio Bot) is an AI-powered assistant that helps visitors learn about Nazzal Kausar and his services.  \r\nBuilt with LangChain, Groq LLMs, Hugging Face Embeddings, and FastAPI, this chatbot supports secure conversations with memory and document-based knowledge retrieval.\r\n\r\n---\r\n\r\n## 🚀 Features\r\n\r\n- 🔐 **Token-secured API** using Bearer authentication\r\n- 🧠 **Conversational Memory** via LangChain's buffer memory\r\n- 📚 **RAG (Retrieval-Augmented Generation)** from uploaded PDF\r\n- ⚡ **Groq LLM** integration for ultra-fast inference (`mixtral` / `llama-4`)\r\n- 💾 FAISS vector store for fast semantic retrieval\r\n- ☁️ Ready for deployment on Render / Railway\r\n\r\n---\r\n\r\n## 🛠️ Tech Stack\r\n\r\n- 🧱 **LangChain** (chat chains, memory, retrieval)\r\n- 🧠 **Groq** LLMs via `langchain-groq`\r\n- 💬 **Hugging Face** embeddings (`e5-small-v2`)\r\n- 🧠 **FAISS** for vector indexing\r\n- ⚡ **FastAPI** backend\r\n\r\n---\r\n\r\n## 📁 Project Structure\r\n\r\n```\r\nportfolio-bot/\r\n├── data/                    # PDF documents\r\n├── faiss_index/             # FAISS vector store (optional)\r\n├── main.py                  # FastAPI app\r\n├── langchain_setup.py       # LLM, embedding, retriever, memory setup\r\n├── .env                     # API keys\r\n├── requirements.txt         # All dependencies\r\n└── README.md\r\n```\r\n\r\n---\r\n\r\n## 🧪 Local Setup\r\n\r\n\u003e ⚡ Requires Python 3.11+ (use `uv`, `venv`, or `poetry`)\r\n\r\n### 1. Clone \u0026 install dependencies\r\n```bash\r\ngit clone https://github.com/nazzal5448/portfolio-bot.git\r\ncd portfolio-bot\r\n\r\n# Option 1: Using uv (recommended)\r\nuv venv\r\nsource .venv/bin/activate\r\nuv pip install -r requirements.txt\r\n```\r\n\r\n### 2. Setup `.env`\r\n\r\n```env\r\nGROQ_API_KEY=your_groq_key_here\r\nCHATBOT_API_KEY=nazzal_secret_token\r\n```\r\n\r\n### 3. Run the API\r\n```bash\r\nuv run uvicorn main:app --reload\r\n```\r\n\r\nThen open:\r\n```\r\nhttp://localhost:8000/docs\r\n```\r\n\r\n---\r\n\r\n## 🔒 Authentication\r\n\r\nAll requests must include the `Authorization` header:\r\n```\r\nAuthorization: Bearer nazzal_secret_token\r\n```\r\n\r\n---\r\n\r\n## ☁️ Deploying to Render (Python)\r\n\r\n1. Create a new **Web Service** on [Render.com](https://render.com)\r\n2. Set your Python version to `3.11`\r\n3. Set build command:\r\n   ```bash\r\n   uv pip install -r requirements.txt\r\n   ```\r\n4. Set start command:\r\n   ```bash\r\n   uv run uvicorn main:app --host 0.0.0.0 --port 10000\r\n   ```\r\n5. Add environment variables in Render's dashboard:\r\n   - `GROQ_API_KEY`\r\n   - `CHATBOT_API_KEY`\r\n\r\n---\r\n\r\n## 📬 API Example (cURL)\r\n\r\n```bash\r\ncurl -X POST http://localhost:8000/chat \\\r\n-H \"Authorization: Bearer nazzal_secret_token\" \\\r\n-H \"Content-Type: application/json\" \\\r\n-d '{\"query\": \"Tell me about Nazzal\\'s services.\"}'\r\n```\r\n\r\n---\r\n\r\n## 📌 Future Features\r\n\r\n- 💾 Multi-user memory via Redis\r\n- 🔁 Async background task queues\r\n- 🧠 Skill-based tool calling (RAG + n8n)\r\n\r\n---\r\n\r\n## 🧑‍💻 About Nazzal\r\n\r\nThis project is built by [Nazzal Kausar](https://nazzalkausar.com), an aspiring AI Engineer focused on RAG systems, GenAI apps, and workflow automation.\r\n\r\n---\r\n\r\n## 📃 License\r\n\r\nMIT – feel free to fork, reuse, and improve!\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnazzal5448%2Fportfolio-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnazzal5448%2Fportfolio-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnazzal5448%2Fportfolio-bot/lists"}