{"id":26916853,"url":"https://github.com/codewithalihamza/nestjs-ai-assistant","last_synced_at":"2025-04-01T19:49:57.145Z","repository":{"id":280098659,"uuid":"940977602","full_name":"codewithalihamza/NestJs-AI-Assistant","owner":"codewithalihamza","description":"NestJS AI Assistant is a powerful chatbot API built with NestJS and Google Gemini AI to provide intelligent, real-time conversations. It supports multi-session chat history, ensuring context-aware interactions.","archived":false,"fork":false,"pushed_at":"2025-03-01T11:59:52.000Z","size":102,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-01T12:28:14.078Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/codewithalihamza.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-01T07:22:18.000Z","updated_at":"2025-03-01T12:00:48.000Z","dependencies_parsed_at":"2025-03-01T12:42:05.632Z","dependency_job_id":null,"html_url":"https://github.com/codewithalihamza/NestJs-AI-Assistant","commit_stats":null,"previous_names":["codewithalihamza/nestjs-openai","codewithalihamza/nestjs-ai-assistant"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithalihamza%2FNestJs-AI-Assistant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithalihamza%2FNestJs-AI-Assistant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithalihamza%2FNestJs-AI-Assistant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithalihamza%2FNestJs-AI-Assistant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codewithalihamza","download_url":"https://codeload.github.com/codewithalihamza/NestJs-AI-Assistant/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246706241,"owners_count":20820784,"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-04-01T19:49:56.660Z","updated_at":"2025-04-01T19:49:57.123Z","avatar_url":"https://github.com/codewithalihamza.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"http://nestjs.com/\" target=\"blank\"\u003e\u003cimg src=\"https://nestjs.com/img/logo-small.svg\" width=\"200\" alt=\"Nest Logo\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# \u003cp align=\"center\"\u003e🚀 NestJS AI Assistant – Conversational AI\u003c/p\u003e\n\n## Description\n\nNestJS AI Assistant is a powerful chatbot API built with NestJS and Google Gemini AI to provide intelligent, real-time conversations. It supports multi-session chat history, ensuring context-aware interactions.\n\nFeatures:\n- 🌟 Google Gemini AI Integration\n- 💬 Multi-session Chat History\n- 🚀 Built with NestJS for Scalability\n- 🔐 Secure API with Configurable Keys\n- 🔄 Easily Extendable for Custom Use Cases\n\n## Installation\n\n```bash\n$ yarn install\n```\n\n## Running the app\n\n```bash\n# development\n$ yarn run start\n\n# watch mode\n$ yarn run start:dev\n\n# production mode\n$ yarn run start:prod\n```\n\n## API Documentation\n### **Chat with AI Assistant**\n#### **Endpoint:**\n```\nPOST /ai_assistant/chat\n```\n\n#### **Request Headers:**\n```json\n{\n  \"Content-Type\": \"application/json\"\n}\n```\n\n#### **Request Body:**\n| Parameter  | Type   | Required | Description |\n|------------|--------|----------|-------------|\n| `prompt`   | string | ✅ Yes   | The text input for the AI model. |\n| `sessionId` | string | ❌ No  | A unique identifier to maintain chat history (optional). |\n\n#### **Example Request:**\n```bash\ncurl -X POST http://localhost:5000/ai_assistant/chat \\\n-H \"Content-Type: application/json\" \\\n-d '{\n  \"prompt\": \"What is the capital of Pakistan?\",\n  \"sessionId\": \"uuid\"\n}'\n```\n\n#### **Example Response:**\n```json\n{\n  \"response\": \"The capital of Pakistan is Islamabad.\",\n  \"sessionId\": \"uuid\"\n}\n```\n\n#### **Response Details:**\n| Parameter   | Type   | Description |\n|-------------|--------|-------------|\n| `response`  | string | The AI-generated reply. |\n| `sessionId` | string | The same session ID (if provided) for tracking conversation history. |\n\n---\n\n## Notes\n- The `sessionId` is **optional** but useful for maintaining chat context.\n- If `sessionId` is provided, the AI will remember previous prompts and responses.\n\n\n## 💫 About Me:\nI'm Ali Hamza from Pakistan 🇵🇰, an experienced Full Stack Developer. With a comprehensive understanding of both front-end and back-end technologies, I am dedicated to creating strong and reliable software applications that perform well and meet the needs of the users effectively. 💻🚀\n\n## 💻 Tech Stack:\n![JavaScript](https://img.shields.io/badge/javascript-%23323330.svg?style=flat\u0026logo=javascript\u0026logoColor=%23F7DF1E) ![React](https://img.shields.io/badge/react-%2320232a.svg?style=flat\u0026logo=react\u0026logoColor=%2361DAFB) ![Next JS](https://img.shields.io/badge/Next-black?style=flat\u0026logo=next.js\u0026logoColor=white) ![Bootstrap](https://img.shields.io/badge/bootstrap-%238511FA.svg?style=flat\u0026logo=bootstrap\u0026logoColor=white) ![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=flat\u0026logo=node.js\u0026logoColor=white) ![NestJS](https://img.shields.io/badge/nestjs-%23E0234E.svg?style=flat\u0026logo=nestjs\u0026logoColor=white) ![Express.js](https://img.shields.io/badge/express.js-%23404d59.svg?style=flat\u0026logo=express\u0026logoColor=%2361DAFB) ![CSS3](https://img.shields.io/badge/css3-%231572B6.svg?style=flat\u0026logo=css3\u0026logoColor=white) ![HTML5](https://img.shields.io/badge/html5-%23E34F26.svg?style=flat\u0026logo=html5\u0026logoColor=white) ![TypeScript](https://img.shields.io/badge/typescript-%23007ACC.svg?style=flat\u0026logo=typescript\u0026logoColor=white) ![MongoDB](https://img.shields.io/badge/MongoDB-%234ea94b.svg?style=flat\u0026logo=mongodb\u0026logoColor=white) ![Postgres](https://img.shields.io/badge/postgres-%23316192.svg?style=flat\u0026logo=postgresql\u0026logoColor=white) ![MySQL](https://img.shields.io/badge/mysql-%2300000f.svg?style=flat\u0026logo=mysql\u0026logoColor=white) ![GraphQL](https://img.shields.io/badge/-GraphQL-E10098?style=flat\u0026logo=graphql\u0026logoColor=white) ![TailwindCSS](https://img.shields.io/badge/tailwindcss-%2338B2AC.svg?style=flat\u0026logo=tailwind-css\u0026logoColor=white)\n\n\n## Stay in touch\n\n- Linkedin - [@syedalihamzaofficial](https://www.linkedin.com/in/syedalihamzaofficial/)\n- Website - [Ali Hamza](https://syedalihamzaofficial.blogspot.com/)\n- Medium - [@syedalihamzaofficial](https://medium.com/@syedalihamzaofficial)\n- YouTube - [@TechnicalHamzaOfficial1](https://www.youtube.com/@TechnicalHamzaOfficial1)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewithalihamza%2Fnestjs-ai-assistant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodewithalihamza%2Fnestjs-ai-assistant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewithalihamza%2Fnestjs-ai-assistant/lists"}