{"_id":"@abhinav1201/rag-ai-accelerator","_rev":"3-6cd1e8e842df3e8190eaf08cf54ea668","name":"@abhinav1201/rag-ai-accelerator","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@abhinav1201/rag-ai-accelerator","version":"0.1.0","keywords":["rag","chatbot","vector-database","pinecone","pgvector","openai","anthropic","ollama","nextjs","react","ai","llm"],"author":{"name":"Abhinav Alkuchi"},"license":"MIT","_id":"@abhinav1201/rag-ai-accelerator@0.1.0","maintainers":[{"name":"abhinav1201","email":"abhinavalkuchi@gmail.com"}],"dist":{"shasum":"4cadcd8c74b34e795edc4c9f57b5fd5907e82f07","tarball":"https://registry.npmjs.org/@abhinav1201/rag-ai-accelerator/-/rag-ai-accelerator-0.1.0.tgz","fileCount":61,"integrity":"sha512-RqAqB4BIUIgBTe3xLpHtTkN75m6IR9FsdbrFMgmpuVfGwz407Sw2QkGFyFv+yo2XEj/SmR88HsLOE+J5KyZdPQ==","signatures":[{"sig":"MEUCIQD/xRRgKAh/KUx28lIHQZGfoJXx1ZpdwftpnDrDgOYR/gIgasmIqQQQU9XEnMcQzjWXlnY5LvjuSVi1AMurqtYgifM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":428216},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./server":{"types":"./dist/server.d.ts","import":"./dist/server.mjs","require":"./dist/server.js"},"./handlers":{"types":"./dist/handlers/index.d.ts","import":"./dist/handlers/index.mjs","require":"./dist/handlers/index.js"}},"gitHead":"e85fa5191770ffeb6a1894968f16c40956f739a8","scripts":{"dev":"next dev","lint":"eslint","build":"next build","start":"next start","build:pkg":"tsup src/index.ts src/handlers/index.ts src/server.ts --format cjs,esm --dts --clean --tsconfig tsconfig.build.json --external react,react-dom,next","prepublishOnly":"npm run build:pkg"},"_npmUser":{"name":"abhinav1201","email":"abhinavalkuchi@gmail.com"},"_npmVersion":"11.10.0","description":"A plug-and-play AI accelerator for RAG chat experiences — generic vector DB + LLM provider, embeddable or standalone.","directories":{},"_nodeVersion":"22.10.0","dependencies":{"pg":"^8.20.0","next":">=14.0.0","axios":"^1.15.0","react":">=18.0.0","openai":"^6.34.0","mammoth":"^1.8.0","mongodb":"^7.1.1","pdf-parse":"^1.1.1","react-dom":">=18.0.0","remark-gfm":"^4.0.1","next-themes":"^0.4.6","lucide-react":"^1.8.0","react-markdown":"^10.1.0","@anthropic-ai/sdk":"^0.90.0","@pinecone-database/pinecone":"^7.2.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","eslint":"^9","@types/pg":"^8.20.0","typescript":"^5","@types/node":"^20","tailwindcss":"^4","@types/react":"^19.2.14","@types/pdf-parse":"^1.1.5","@types/react-dom":"^19.2.3","eslint-config-next":"16.2.4","@tailwindcss/postcss":"^4"},"peerDependencies":{"next":">=14.0.0","react":">=18.0.0","react-dom":">=18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rag-ai-accelerator_0.1.0_1776579195544_0.16446420076128754","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@abhinav1201/rag-ai-accelerator","version":"0.1.1","keywords":["rag","chatbot","vector-database","pinecone","pgvector","openai","anthropic","ollama","nextjs","react","ai","llm"],"author":{"name":"Abhinav Alkuchi"},"license":"MIT","_id":"@abhinav1201/rag-ai-accelerator@0.1.1","maintainers":[{"name":"abhinav1201","email":"abhinavalkuchi@gmail.com"}],"dist":{"shasum":"906e85551608fb96b4156cd593c8cb4e5aeb6640","tarball":"https://registry.npmjs.org/@abhinav1201/rag-ai-accelerator/-/rag-ai-accelerator-0.1.1.tgz","fileCount":61,"integrity":"sha512-Ep7E2UqM9YOiXfq2myeZeIUejYeiMD8TRlO1y/Tdf3E9kR2znMtKAiJ9FuxiXRoueEOY8id/swrpcNHtTIg9Qg==","signatures":[{"sig":"MEYCIQCtCKf0JFS9O5uKQUe2FkfOYryGlHuSL2kc1ZFXkWrbpQIhAMtnOVJUQcF/ckWYL5hjHovz23Zi3ooRQoNnzAAhvn6h","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":428216},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./server":{"types":"./dist/server.d.ts","import":"./dist/server.mjs","require":"./dist/server.js"},"./handlers":{"types":"./dist/handlers/index.d.ts","import":"./dist/handlers/index.mjs","require":"./dist/handlers/index.js"}},"gitHead":"e85fa5191770ffeb6a1894968f16c40956f739a8","scripts":{"dev":"next dev","lint":"eslint","build":"next build","start":"next start","build:pkg":"tsup src/index.ts src/handlers/index.ts src/server.ts --format cjs,esm --dts --clean --tsconfig tsconfig.build.json --external react,react-dom,next","prepublishOnly":"npm run build:pkg"},"_npmUser":{"name":"abhinav1201","email":"abhinavalkuchi@gmail.com"},"_npmVersion":"11.10.0","description":"A plug-and-play AI accelerator for RAG chat experiences — generic vector DB + LLM provider, embeddable or standalone.","directories":{},"_nodeVersion":"22.10.0","dependencies":{"pg":"^8.20.0","next":">=14.0.0","axios":"^1.15.0","react":">=18.0.0","openai":"^6.34.0","mammoth":"^1.8.0","mongodb":"^7.1.1","pdf-parse":"^1.1.1","react-dom":">=18.0.0","remark-gfm":"^4.0.1","next-themes":"^0.4.6","lucide-react":"^1.8.0","react-markdown":"^10.1.0","@anthropic-ai/sdk":"^0.90.0","@pinecone-database/pinecone":"^7.2.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","eslint":"^9","@types/pg":"^8.20.0","typescript":"^5","@types/node":"^20","tailwindcss":"^4","@types/react":"^19.2.14","@types/pdf-parse":"^1.1.5","@types/react-dom":"^19.2.3","eslint-config-next":"16.2.4","@tailwindcss/postcss":"^4"},"peerDependencies":{"next":">=14.0.0","react":">=18.0.0","react-dom":">=18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rag-ai-accelerator_0.1.1_1776580901642_0.6495671908880696","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@abhinav1201/rag-ai-accelerator","version":"0.1.2","description":"A plug-and-play AI accelerator for RAG chat experiences — generic vector DB + LLM provider, embeddable or standalone.","author":{"name":"Abhinav Alkuchi"},"license":"MIT","keywords":["rag","chatbot","vector-database","pinecone","pgvector","openai","anthropic","ollama","nextjs","react","ai","llm"],"main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.js","import":"./dist/index.mjs"},"./handlers":{"types":"./dist/handlers/index.d.ts","require":"./dist/handlers/index.js","import":"./dist/handlers/index.mjs"},"./server":{"types":"./dist/server.d.ts","require":"./dist/server.js","import":"./dist/server.mjs"}},"scripts":{"dev":"next dev","build":"next build","build:pkg":"tsup src/index.ts src/handlers/index.ts src/server.ts --format cjs,esm --dts --clean --tsconfig tsconfig.build.json --external react,react-dom,next","start":"next start","lint":"eslint","prepublishOnly":"npm run build:pkg"},"peerDependencies":{"next":">=14.0.0","react":">=18.0.0","react-dom":">=18.0.0"},"dependencies":{"@anthropic-ai/sdk":"^0.90.0","@pinecone-database/pinecone":"^7.2.0","axios":"^1.15.0","lucide-react":"^1.8.0","mammoth":"^1.8.0","mongodb":"^7.1.1","next":">=14.0.0","next-themes":"^0.4.6","openai":"^6.34.0","pdf-parse":"^1.1.1","pg":"^8.20.0","react":">=18.0.0","react-dom":">=18.0.0","react-markdown":"^10.1.0","remark-gfm":"^4.0.1"},"devDependencies":{"@tailwindcss/postcss":"^4","@types/node":"^20","@types/pdf-parse":"^1.1.5","@types/pg":"^8.20.0","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","eslint":"^9","eslint-config-next":"16.2.4","tailwindcss":"^4","tsup":"^8.5.1","typescript":"^5"},"gitHead":"e85fa5191770ffeb6a1894968f16c40956f739a8","_id":"@abhinav1201/rag-ai-accelerator@0.1.2","_nodeVersion":"22.10.0","_npmVersion":"11.10.0","dist":{"integrity":"sha512-TTdvSVlxL5nwpMMj2Q3UVwivezJLvZDqRmayoIrGIPj9L3TEYEXQg7gociJlANxUEMuNAx/goWZtjZE+p70ssw==","shasum":"07694f2fcb1a216d21950fe70c826c618ee37b24","tarball":"https://registry.npmjs.org/@abhinav1201/rag-ai-accelerator/-/rag-ai-accelerator-0.1.2.tgz","fileCount":61,"unpackedSize":444010,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIG45HPV3zVhr9XoJ23FEl2v9t9WYKlZoZ8KoRHSbZSZ3AiAycWxJlITlt5uZl1BUGrPgztqPtKjmKxUBJc5u8j5AMg=="}]},"_npmUser":{"name":"abhinav1201","email":"abhinavalkuchi@gmail.com"},"directories":{},"maintainers":[{"name":"abhinav1201","email":"abhinavalkuchi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/rag-ai-accelerator_0.1.2_1776582182036_0.9383417386036241"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-19T06:13:15.462Z","modified":"2026-04-19T07:03:02.329Z","0.1.0":"2026-04-19T06:13:15.726Z","0.1.1":"2026-04-19T06:41:41.815Z","0.1.2":"2026-04-19T07:03:02.219Z"},"author":{"name":"Abhinav Alkuchi"},"license":"MIT","keywords":["rag","chatbot","vector-database","pinecone","pgvector","openai","anthropic","ollama","nextjs","react","ai","llm"],"description":"A plug-and-play AI accelerator for RAG chat experiences — generic vector DB + LLM provider, embeddable or standalone.","maintainers":[{"name":"abhinav1201","email":"abhinavalkuchi@gmail.com"}],"readme":"# @abhinav1201/rag-ai-accelerator\n\n> **A plug-and-play AI accelerator for RAG chat experiences** that can be embedded into Next.js apps or used as a standalone demo app. Bring your own vector database, LLM, embeddings, and UI branding.\n\n[![NPM Version](https://img.shields.io/npm/v/@abhinav1201/rag-ai-accelerator?style=flat-square&color=6366f1)](https://www.npmjs.com/package/@abhinav1201/rag-ai-accelerator)\n[![NPM Downloads](https://img.shields.io/npm/dm/@abhinav1201/rag-ai-accelerator?style=flat-square&color=8b5cf6)](https://www.npmjs.com/package/@abhinav1201/rag-ai-accelerator)\n[![GitHub](https://img.shields.io/badge/GitHub-Repository-black?style=flat-square&logo=github)](https://github.com/abhinav1201/ai-accelerator)\n![Next.js](https://img.shields.io/badge/Next.js-14+-black?style=flat-square&logo=next.js)\n![TailwindCSS](https://img.shields.io/badge/TailwindCSS-v4-38bdf8?style=flat-square&logo=tailwindcss)\n\n---\n\n## ✨ Features\n\n| Category | Options |\n|---|---|\n| **Vector DBs** | Pinecone, pgVector (PostgreSQL), MongoDB Atlas, ChromaDB, Qdrant, universal REST adapters |\n| **LLM Providers** | OpenAI, Anthropic Claude, Google Gemini, Ollama, LiteLLM, universal REST adapters |\n| **Document Ingestion** | Universal support for **PDF**, **DOCX**, **CSV**, **JSON**, **MD**, **TXT** |\n| **UI** | Full-page `ChatWindow` + floating `ChatWidget`, fully branded & responsive |\n| **RAG** | Configurable chunk size/overlap, top-K retrieval, score threshold, namespaced multi-tenancy |\n\n---\n\n## 🚀 How it Works\n\nThe AI Accelerator acts as a universal bridge between your data and your users. It normalizes different AI providers and Vector databases into a single interface.\n\n1.  **Ingest**: Upload or send documents to the `/api/upload` endpoint. They are automatically parsed, chunked, and embedded.\n2.  **Retrieve**: When a user asks a question, the system converts it to a vector and searches your configured database.\n3.  **Generate**: The retrieved context is combined with the user query and sent to your configured LLM (OpenAI, Claude, etc.) to generate a grounded response.\n\n### 📦 How to Install\n\nTo integrate the AI Accelerator into your existing Next.js project, simply run:\n\n```bash\nnpm install @abhinav1201/rag-ai-accelerator\n```\n\nAlternatively, if you want to run the standalone demo application:\n\n```bash\ngit clone https://github.com/abhinav1201/ai-accelerator\ncd ai-accelerator\nnpm install\ncp .env.example .env.local\n# Fill in your API keys in .env.local\nnpm run dev\n```\n\n---\n\n## NPM Package Usage\n\n### 1. Embed the ChatWidget\n\nWrap your application in the `ConfigProvider` and add the `ChatWidget`.\n\n```tsx\nimport { ConfigProvider, ChatWidget } from '@abhinav1201/rag-ai-accelerator';\n\nexport default function Layout({ children }) {\n  return (\n    <ConfigProvider\n      config={{\n        projectId: 'my-project',\n        ui: {\n          title: 'Support Bot',\n          primaryColor: '#6366f1',\n          accentColor: '#8b5cf6',\n          welcomeMessage: 'Hi! How can I help you today?',\n        },\n      }}\n    >\n      {children}\n      <ChatWidget position=\"bottom-right\" />\n    </ConfigProvider>\n  );\n}\n```\n\n### 2. Mount the API routes\n\nCreate standard Next.js route handlers and plug in the library's factories.\n\n```ts\n// src/app/api/chat/route.ts\nimport { createChatHandler, getRagConfig } from '@abhinav1201/rag-ai-accelerator/server';\nexport const POST = createChatHandler(getRagConfig());\n\n// src/app/api/upload/route.ts (Handles PDF, DOCX, etc.)\nimport { createUploadHandler, getRagConfig } from '@abhinav1201/rag-ai-accelerator/server';\nexport const POST = createUploadHandler(getRagConfig());\n```\n\n### 3. Use RAGPipeline programmatically\n\n```ts\nimport { RAGPipeline } from '@abhinav1201/rag-ai-accelerator/server';\n\nconst pipeline = new RAGPipeline(config);\nawait pipeline.ingest([{ docId: 'readme', content: 'Your document text here' }]);\nconst { reply, sources } = await pipeline.ask('What is the refund policy?');\n```\n\n---\n\n## Configuration Reference\n\nThe library is entirely dynamic. You can switch between providers simply by updating your environment variables.\n\n| Variable | Description |\n|---|---|\n| `RAG_PROJECT_ID` | Project namespace for data isolation |\n| `VECTOR_DB_PROVIDER` | `pinecone`, `pgvector`, `mongodb`, or `universal_rest` |\n| `VECTOR_UNIVERSAL_PROFILE` | `pinecone-rest`, `mongodb-atlas`, `chromadb`, `qdrant` |\n| `LLM_PROVIDER` | `openai`, `anthropic`, `ollama`, or `universal_rest` |\n| `LLM_UNIVERSAL_PROFILE` | `openai-compatible`, `litellm`, `anthropic-claude`, `google-gemini` |\n| `EMBEDDING_PROVIDER` | `openai`, `ollama`, or `rest` |\n\n---\n\n## Architecture\n\n```\nUser Query\n   |\n   v\n[embed query]  <-- EmbeddingProvider (OpenAI / Ollama / Custom)\n   |\n   v\n[vector search]  <-- IVectorDB (Pinecone / pgVector / MongoDB / Chroma / REST)\n   |\n   v\n[build context]\n   |\n   v\n[LLM chat]  <-- ILLMProvider (OpenAI / Anthropic / Gemini / LiteLLM)\n   |\n   v\nChatResponse { reply, sources[] }\n```\n\n---\n\n## License\n\nMIT - GSPANN Technologies\n","readmeFilename":"README.md"}