{"_id":"@digitalchokro/provider-gemini","_rev":"8-4efec79e63ccec755483576187563147","name":"@digitalchokro/provider-gemini","dist-tags":{"latest":"1.1.6"},"versions":{"1.0.6":{"name":"@digitalchokro/provider-gemini","version":"1.0.6","keywords":["askchokro","sql","ai","llm","text-to-sql","nlp","rag","database","analytics","business intelligence","agent","generative ai","typescript","node.js"],"author":{"name":"digitalchokro"},"license":"MIT","_id":"@digitalchokro/provider-gemini@1.0.6","maintainers":[{"name":"imnurmohammad.me","email":"founder@digitalchokro.com"}],"dist":{"shasum":"23d100e8c295aa7c173685c6ba83ae17e6aa3496","tarball":"https://registry.npmjs.org/@digitalchokro/provider-gemini/-/provider-gemini-1.0.6.tgz","fileCount":5,"integrity":"sha512-FZ9dJ7GuVG5GhQG8fOG+gIjRbybTnhm3Uv6ZJUR8Tchbi3ILGM/OcpGtPe6ivb0M7L2TTCEibXLcwluUnAN17w==","signatures":[{"sig":"MEUCIQDKcF+RRDBD42HAHX2xyASteuL5jQAcWpO7YIfC7NWxywIgD4/DJdznTaHP90rHjTFR0DvYmczXW6SymQtZnNBPhuE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18638},"main":"./dist/index.js","type":"module","_from":"file:digitalchokro-provider-gemini-1.0.6.tgz","types":"./dist/index.d.ts","scripts":{"dev":"tsup src/index.ts --format esm --dts --watch","build":"tsup src/index.ts --format esm --dts","clean":"rm -rf dist"},"_npmUser":{"name":"imnurmohammad.me","email":"founder@digitalchokro.com"},"_resolved":"/tmp/5009e59c814ab258c67d9b87952a148e/digitalchokro-provider-gemini-1.0.6.tgz","_integrity":"sha512-FZ9dJ7GuVG5GhQG8fOG+gIjRbybTnhm3Uv6ZJUR8Tchbi3ILGM/OcpGtPe6ivb0M7L2TTCEibXLcwluUnAN17w==","_npmVersion":"10.9.8","description":"Google Gemini AI provider for AskChokro using @google/genai","directories":{},"_nodeVersion":"22.23.1","dependencies":{"@google/genai":"^2.10.0","@digitalchokro/core":"1.0.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","typescript":"^5.7.2"},"_npmOperationalInternal":{"tmp":"tmp/provider-gemini_1.0.6_1783079816838_0.11212989244179594","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@digitalchokro/provider-gemini","version":"1.1.0","keywords":["askchokro","sql","ai","llm","text-to-sql","nlp","rag","database","analytics","business intelligence","agent","generative ai","typescript","node.js"],"author":{"name":"digitalchokro"},"license":"MIT","_id":"@digitalchokro/provider-gemini@1.1.0","maintainers":[{"name":"imnurmohammad.me","email":"founder@digitalchokro.com"}],"dist":{"shasum":"7354aabe98b746a82b927dee9967a6947e2a48fd","tarball":"https://registry.npmjs.org/@digitalchokro/provider-gemini/-/provider-gemini-1.1.0.tgz","fileCount":5,"integrity":"sha512-vDHKjRrBlWNU5F8iq3+uxG95+rfVnZ5Q3rKEvVsDvL/L0DaTD6OpVAIOWLslrki6MoAyxHdXlaes3hZ3S3PUbQ==","signatures":[{"sig":"MEUCIQDjZmsmEUTm08brepPCEIFksPZa7JUAZNb0CGI1FFYVPwIgZsF5lcxujfWNzidNwRofoTc3WtMe2Df68Wh4keR1m2Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14728},"main":"./dist/index.js","type":"module","_from":"file:digitalchokro-provider-gemini-1.1.0.tgz","types":"./dist/index.d.ts","scripts":{"dev":"tsup src/index.ts --format esm --dts --watch","build":"tsup src/index.ts --format esm --dts","clean":"rm -rf dist"},"_npmUser":{"name":"imnurmohammad.me","email":"founder@digitalchokro.com"},"_resolved":"/tmp/e5dd6579e190b701fb266157b0ae9d4f/digitalchokro-provider-gemini-1.1.0.tgz","_integrity":"sha512-vDHKjRrBlWNU5F8iq3+uxG95+rfVnZ5Q3rKEvVsDvL/L0DaTD6OpVAIOWLslrki6MoAyxHdXlaes3hZ3S3PUbQ==","_npmVersion":"10.9.8","description":"Google Gemini AI provider for AskChokro using @google/genai","directories":{},"_nodeVersion":"22.23.1","dependencies":{"@google/genai":"^2.10.0","@digitalchokro/core":"1.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","typescript":"^5.7.2"},"_npmOperationalInternal":{"tmp":"tmp/provider-gemini_1.1.0_1783082101644_0.7633180378781632","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@digitalchokro/provider-gemini","version":"1.1.1","keywords":["askchokro","sql","ai","llm","text-to-sql","nlp","rag","database","analytics","business intelligence","agent","generative ai","typescript","node.js"],"author":{"name":"digitalchokro"},"license":"MIT","_id":"@digitalchokro/provider-gemini@1.1.1","maintainers":[{"name":"imnurmohammad.me","email":"founder@digitalchokro.com"}],"dist":{"shasum":"2482fd348913f7f0969f29da57422e3493addc68","tarball":"https://registry.npmjs.org/@digitalchokro/provider-gemini/-/provider-gemini-1.1.1.tgz","fileCount":5,"integrity":"sha512-PSZft7SjiQy3gYUw9BZ9ZAUSGruBs6LWQOtgzKjeF7u0um/5zbugMDwGIFa7pvPlZiHZBo08YW/YygoZtgnyHg==","signatures":[{"sig":"MEUCIQDBoMaa2nitJgA8tSxs7EZ0PblZ7IE9Eb069mv8IR+AsQIgJBvwI3nxxJvjKF+UR9PwKrPYTtW3yUlFxQSo3q/SIgE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14951},"main":"./dist/index.js","type":"module","_from":"file:digitalchokro-provider-gemini-1.1.1.tgz","types":"./dist/index.d.ts","scripts":{"dev":"tsup src/index.ts --format esm --dts --watch","build":"tsup src/index.ts --format esm --dts","clean":"rm -rf dist"},"_npmUser":{"name":"imnurmohammad.me","email":"founder@digitalchokro.com"},"_resolved":"/tmp/09598b5da6d5b42aaf052652ab1c3aa1/digitalchokro-provider-gemini-1.1.1.tgz","_integrity":"sha512-PSZft7SjiQy3gYUw9BZ9ZAUSGruBs6LWQOtgzKjeF7u0um/5zbugMDwGIFa7pvPlZiHZBo08YW/YygoZtgnyHg==","_npmVersion":"10.9.8","description":"Google Gemini AI provider for AskChokro using @google/genai","directories":{},"_nodeVersion":"22.23.1","dependencies":{"@google/genai":"^2.10.0","@digitalchokro/core":"1.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","typescript":"^5.7.2"},"_npmOperationalInternal":{"tmp":"tmp/provider-gemini_1.1.1_1783084553030_0.5515548030833142","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@digitalchokro/provider-gemini","version":"1.1.2","keywords":["askchokro","sql","ai","llm","text-to-sql","nlp","rag","database","analytics","business intelligence","agent","generative ai","typescript","node.js"],"author":{"name":"digitalchokro"},"license":"MIT","_id":"@digitalchokro/provider-gemini@1.1.2","maintainers":[{"name":"imnurmohammad.me","email":"founder@digitalchokro.com"}],"dist":{"shasum":"2df37a8e4b09101b47db5edabac5060583348599","tarball":"https://registry.npmjs.org/@digitalchokro/provider-gemini/-/provider-gemini-1.1.2.tgz","fileCount":6,"integrity":"sha512-O/NUEmYNyvmG/E8QsxPYW56B9J08HqRINmVHslqQvms2GLylGvbYRZQxLscNMQoB5AkC4BmhCnqjIPM3vzz49Q==","signatures":[{"sig":"MEUCID3O50eSz9jR2IQrLMl3oCQk413kSuPPFY4TMbAkXew0AiEArfeh5G2pCwUh8KHYP/D4e/T/0bLTSefHGw3IXeAVcvk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20618},"main":"./dist/index.js","type":"module","_from":"file:digitalchokro-provider-gemini-1.1.2.tgz","types":"./dist/index.d.ts","scripts":{"dev":"tsup src/index.ts --format esm --dts --watch --sourcemap","build":"tsup src/index.ts --format esm --dts --sourcemap","clean":"rm -rf dist"},"_npmUser":{"name":"imnurmohammad.me","email":"founder@digitalchokro.com"},"_resolved":"/tmp/6c1382c556509a777f6db91445579e89/digitalchokro-provider-gemini-1.1.2.tgz","_integrity":"sha512-O/NUEmYNyvmG/E8QsxPYW56B9J08HqRINmVHslqQvms2GLylGvbYRZQxLscNMQoB5AkC4BmhCnqjIPM3vzz49Q==","_npmVersion":"10.9.8","description":"Google Gemini AI provider for AskChokro using @google/genai","directories":{},"_nodeVersion":"22.23.1","dependencies":{"@google/genai":"^2.10.0","@digitalchokro/core":"1.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","typescript":"^5.7.2"},"_npmOperationalInternal":{"tmp":"tmp/provider-gemini_1.1.2_1783085117487_0.6347007968491867","host":"s3://npm-registry-packages-npm-production"}},"1.1.3":{"name":"@digitalchokro/provider-gemini","version":"1.1.3","keywords":["askchokro","sql","ai","llm","text-to-sql","nlp","rag","database","analytics","business intelligence","agent","generative ai","typescript","node.js"],"author":{"name":"digitalchokro"},"license":"MIT","_id":"@digitalchokro/provider-gemini@1.1.3","maintainers":[{"name":"imnurmohammad.me","email":"founder@digitalchokro.com"}],"dist":{"shasum":"28c82f4ac8ede91296dcda75d345922552b91526","tarball":"https://registry.npmjs.org/@digitalchokro/provider-gemini/-/provider-gemini-1.1.3.tgz","fileCount":6,"integrity":"sha512-h+zKwAYYibAFTfC2ZgHOglcbTEKKRR4e2xqVSMy8NvL/oQNm2BksSkpRcJ91XHmgChsDngtFJMH0hB3/D723Ug==","signatures":[{"sig":"MEUCIQD8GM2xaR8ers8F5UFqy6oTufgqMQKZXMmgxpEVET7VdgIgfuK+eWfvhhQKoi3V9Cr51PPDbV2ByZDX8nJkfSFgedk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20618},"main":"./dist/index.js","type":"module","_from":"file:digitalchokro-provider-gemini-1.1.3.tgz","types":"./dist/index.d.ts","scripts":{"dev":"tsup src/index.ts --format esm --dts --watch --sourcemap","build":"tsup src/index.ts --format esm --dts --sourcemap","clean":"rm -rf dist"},"_npmUser":{"name":"imnurmohammad.me","email":"founder@digitalchokro.com"},"_resolved":"/tmp/00f3a1ba2fbeead3e15fbf053e5135c7/digitalchokro-provider-gemini-1.1.3.tgz","_integrity":"sha512-h+zKwAYYibAFTfC2ZgHOglcbTEKKRR4e2xqVSMy8NvL/oQNm2BksSkpRcJ91XHmgChsDngtFJMH0hB3/D723Ug==","_npmVersion":"10.9.8","description":"Google Gemini AI provider for AskChokro using @google/genai","directories":{},"_nodeVersion":"22.23.1","dependencies":{"@google/genai":"^2.10.0","@digitalchokro/core":"1.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","typescript":"^5.7.2"},"_npmOperationalInternal":{"tmp":"tmp/provider-gemini_1.1.3_1783100303872_0.27641890048766027","host":"s3://npm-registry-packages-npm-production"}},"1.1.4":{"name":"@digitalchokro/provider-gemini","version":"1.1.4","keywords":["askchokro","sql","ai","llm","text-to-sql","nlp","rag","database","analytics","business intelligence","agent","generative ai","typescript","node.js"],"author":{"name":"digitalchokro"},"license":"MIT","_id":"@digitalchokro/provider-gemini@1.1.4","maintainers":[{"name":"imnurmohammad.me","email":"founder@digitalchokro.com"}],"dist":{"shasum":"e8d7b2bc972aa8b82569210525003bc2d1fb30ba","tarball":"https://registry.npmjs.org/@digitalchokro/provider-gemini/-/provider-gemini-1.1.4.tgz","fileCount":6,"integrity":"sha512-0uXEUljx7TGTbjsEwSCiZ/00helk1POzH4Ime09/uGvPJ1l92Mii0b0Bw1/aTVeFym6fM/LdFiVb3P+dK5BD9Q==","signatures":[{"sig":"MEUCIQClRPReidCmxdvpVGs9WiQzG72F/pLt6kPFeBU3NH3QXwIgbFLAehlrOm6HOFOoFUkROm8YvTi5FEMiVKcSC7xYSTI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21895},"main":"./dist/index.js","type":"module","_from":"file:digitalchokro-provider-gemini-1.1.4.tgz","types":"./dist/index.d.ts","scripts":{"dev":"tsup src/index.ts --format esm --dts --watch --sourcemap","build":"tsup src/index.ts --format esm --dts --sourcemap","clean":"rm -rf dist"},"_npmUser":{"name":"imnurmohammad.me","email":"founder@digitalchokro.com"},"_resolved":"/tmp/0b98de2ac54893121c272264f427932d/digitalchokro-provider-gemini-1.1.4.tgz","_integrity":"sha512-0uXEUljx7TGTbjsEwSCiZ/00helk1POzH4Ime09/uGvPJ1l92Mii0b0Bw1/aTVeFym6fM/LdFiVb3P+dK5BD9Q==","_npmVersion":"10.9.8","description":"Google Gemini AI provider for AskChokro using @google/genai","directories":{},"_nodeVersion":"22.23.1","dependencies":{"@google/genai":"^2.10.0","@digitalchokro/core":"1.1.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","typescript":"^5.7.2"},"_npmOperationalInternal":{"tmp":"tmp/provider-gemini_1.1.4_1783106050990_0.4197602816481887","host":"s3://npm-registry-packages-npm-production"}},"1.1.5":{"name":"@digitalchokro/provider-gemini","version":"1.1.5","keywords":["askchokro","sql","ai","llm","text-to-sql","nlp","rag","database","analytics","business intelligence","agent","generative ai","typescript","node.js"],"author":{"name":"digitalchokro"},"license":"MIT","_id":"@digitalchokro/provider-gemini@1.1.5","maintainers":[{"name":"imnurmohammad.me","email":"founder@digitalchokro.com"}],"dist":{"shasum":"f589467774d7d92ce46c3d60510da70b483a06d9","tarball":"https://registry.npmjs.org/@digitalchokro/provider-gemini/-/provider-gemini-1.1.5.tgz","fileCount":6,"integrity":"sha512-wJQywV+BODawqBPFAUp+qImFoS5694+xM/TdIbUuXoqAGanml2VVt3ASGo2nIptMRJikmywsd5CBo6Wdo6V18g==","signatures":[{"sig":"MEYCIQDgRrrYowCVCrmxtlQ7f9F6d8qXSrHX07Hcjph2ipDTxgIhAI+ULLJ9lqmFYzH8lUNxQKdZpMBV6aSgRVX1Au8SGzsy","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21997},"main":"./dist/index.js","type":"module","_from":"file:digitalchokro-provider-gemini-1.1.5.tgz","types":"./dist/index.d.ts","scripts":{"dev":"tsup src/index.ts --format esm --dts --watch --sourcemap","build":"tsup src/index.ts --format esm --dts --sourcemap","clean":"rm -rf dist"},"_npmUser":{"name":"imnurmohammad.me","email":"founder@digitalchokro.com"},"_resolved":"/tmp/687e2850c6edd141700e3378fdd8ac14/digitalchokro-provider-gemini-1.1.5.tgz","_integrity":"sha512-wJQywV+BODawqBPFAUp+qImFoS5694+xM/TdIbUuXoqAGanml2VVt3ASGo2nIptMRJikmywsd5CBo6Wdo6V18g==","_npmVersion":"10.9.8","description":"Google Gemini AI provider for AskChokro using @google/genai","directories":{},"_nodeVersion":"22.23.1","dependencies":{"@google/genai":"^2.10.0","@digitalchokro/core":"1.1.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","typescript":"^5.7.2"},"_npmOperationalInternal":{"tmp":"tmp/provider-gemini_1.1.5_1783356838336_0.04697969544624914","host":"s3://npm-registry-packages-npm-production"}},"1.1.6":{"name":"@digitalchokro/provider-gemini","version":"1.1.6","description":"Google Gemini AI provider for AskChokro using @google/genai","author":{"name":"Digital Chokro","email":"hello@digitalchokro.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/digitalchokro/askchokro.git","directory":"packages/provider-gemini"},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"main":"./dist/index.js","types":"./dist/index.d.ts","peerDependencies":{"@digitalchokro/core":"1.1.6"},"dependencies":{"@google/genai":"^2.10.0"},"devDependencies":{"tsup":"^8.3.5","typescript":"^5.7.2","vitest":"^2.0.0","@digitalchokro/core":"1.1.6"},"keywords":["askchokro","sql","ai","llm","text-to-sql","nlp","rag","database","analytics","business intelligence","agent","generative ai","typescript","node.js"],"publishConfig":{"access":"public"},"scripts":{"build":"tsup src/index.ts --format esm --dts --sourcemap","dev":"tsup src/index.ts --format esm --dts --watch --sourcemap","lint":"eslint src/","typecheck":"tsc --noEmit","test":"vitest run","clean":"rm -rf dist"},"_id":"@digitalchokro/provider-gemini@1.1.6","bugs":{"url":"https://github.com/digitalchokro/askchokro/issues"},"homepage":"https://github.com/digitalchokro/askchokro#readme","_integrity":"sha512-sHEHnLDioG4SHzFQA/IWagV4/lA7sfjG/zMJkjvjKlSnw3P6VJHAvyvPdPNu/u6Cs1DnB5NOFy1oS/xO68g8iw==","_resolved":"/tmp/7d6fee749b01eeefc2f548e5354818c9/digitalchokro-provider-gemini-1.1.6.tgz","_from":"file:digitalchokro-provider-gemini-1.1.6.tgz","_nodeVersion":"22.23.1","_npmVersion":"10.9.8","dist":{"integrity":"sha512-sHEHnLDioG4SHzFQA/IWagV4/lA7sfjG/zMJkjvjKlSnw3P6VJHAvyvPdPNu/u6Cs1DnB5NOFy1oS/xO68g8iw==","shasum":"400b7fe3b043b0c75fa2a6e6bb94b7c4dc6acd21","tarball":"https://registry.npmjs.org/@digitalchokro/provider-gemini/-/provider-gemini-1.1.6.tgz","fileCount":6,"unpackedSize":30950,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDDDlLyhaNko9dtNKEwbP3jrdEWlhbxEEsEvDLunrfxxAiBxK1AriwalkganXOeN3pOXg1nWr338zzzm6jJtnZAB+Q=="}]},"_npmUser":{"name":"imnurmohammad.me","email":"founder@digitalchokro.com"},"directories":{},"maintainers":[{"name":"imnurmohammad.me","email":"founder@digitalchokro.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/provider-gemini_1.1.6_1784228221977_0.6122978507520722"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-03T11:56:56.647Z","modified":"2026-07-16T18:57:02.334Z","1.0.6":"2026-07-03T11:56:57.008Z","1.1.0":"2026-07-03T12:35:01.810Z","1.1.1":"2026-07-03T13:15:53.176Z","1.1.2":"2026-07-03T13:25:17.620Z","1.1.3":"2026-07-03T17:38:23.999Z","1.1.4":"2026-07-03T19:14:11.163Z","1.1.5":"2026-07-06T16:53:58.448Z","1.1.6":"2026-07-16T18:57:02.138Z"},"author":{"name":"Digital Chokro","email":"hello@digitalchokro.com"},"license":"MIT","keywords":["askchokro","sql","ai","llm","text-to-sql","nlp","rag","database","analytics","business intelligence","agent","generative ai","typescript","node.js"],"description":"Google Gemini AI provider for AskChokro using @google/genai","maintainers":[{"name":"imnurmohammad.me","email":"founder@digitalchokro.com"}],"readme":"<div align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/digitalchokro/askchokro/main/docs/assets/logo.png\" width=\"120\" alt=\"AskChokro Logo\" />\n  <h1>AskChokro</h1>\n  <p><strong>The AI Data Engine for Node.js</strong></p>\n  <p>Add \"Ask your data\" to any SaaS app in 10 minutes. Simpler by design, built for embedding.</p>\n  \n  [![npm version](https://img.shields.io/npm/v/@digitalchokro/askchokro.svg?style=flat-square)](https://www.npmjs.com/package/@digitalchokro/askchokro)\n  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](https://opensource.org/licenses/MIT)\n  [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n</div>\n\n<div align=\"center\">\n  <em>(Looking for Bengali? <a href=\"./README-bn.md\">Read in Bengali / বাংলায় পড়ুন</a>)</em>\n</div>\n<br/>\n<p align=\"center\">\n  <picture>\n    <img src=\"https://raw.githubusercontent.com/digitalchokro/askchokro/main/docs/assets/logo.png\" width=\"800\" height=\"2\" style=\"background: linear-gradient(90deg, transparent, #8e9eab, #eef2f3, #8e9eab, transparent); border-radius: 5px;\"/>\n  </picture>\n</p>\n<br/>\n\n## Instantly see it in action\n\nNo setup, no accounts, just a terminal.\n\n```bash\nnpx @digitalchokro/cli demo\n```\nThis spins up a local SQLite database with sample e-commerce data, auto-detects **Ollama, OpenAI, or Anthropic**, and opens a beautiful Chat UI on `localhost:3000`.\n\n### Demo Database Schema\nThe in-memory SQLite database is seeded with a comprehensive e-commerce schema to test complex queries against:\n- `users` (id, name, email, country, created_at)\n- `products` (id, name, category, price, stock)\n- `orders` (id, user_id, total_amount, status, created_at)\n- `order_items` (id, order_id, product_id, quantity, price)\n- `carts` (id, user_id, created_at)\n- `cart_items` (id, cart_id, product_id, quantity)\n\n*Try asking: \"Who has items in their cart right now?\", \"Which category generates the most revenue?\", \"List all pending orders with amounts\", or \"Show me products under $100\".*\n\n### Anti-Hallucination Fallback (`CANNOT_ANSWER`)\nAskChokro's engine uses a strict system prompt. If you ask a question about data that does not exist in the schema, the model will safely reject the prompt and return `CANNOT_ANSWER` instead of hallucinating fake tables or SQL.\n\n> **Note:** AskChokro can intelligently answer multiple disjoint questions in a single prompt by automatically combining them into scalar subqueries, ensuring you get all your answers in a single database round-trip without breaking the SQL driver.\n\n### Using Local Models (Ollama)\nIf you want to force a specific provider or model, use environment variables:\n\n```bash\n# Force Ollama with a specific model (ignores any API keys in your environment)\nASKCHOKRO_PROVIDER=ollama ASKCHOKRO_MODEL=qwen2.5-coder npx @digitalchokro/cli demo\n\n# Force Anthropic\nASKCHOKRO_PROVIDER=anthropic ANTHROPIC_API_KEY=sk-ant-... npx @digitalchokro/cli demo\n```\n\n---\n\n## Why AskChokro?\n\nIf you've tried building \"AI analytics\" features into your SaaS, you know the drill:\n- **Python wrappers:** You have to deploy a separate Python microservice just to run LangChain or LlamaIndex.\n- **Heavy BI tools:** You look at tools like WrenAI or Superset, but they are full platforms. You just want a simple API endpoint to power a chat box in your own React app.\n- **Security nightmares:** How do you guarantee the AI doesn't `DROP TABLE` or leak Tenant A's data to Tenant B?\n\n**AskChokro is different:**\n1. **100% TypeScript.** Runs right in your Node.js backend (Next.js, Express, Fastify).\n2. **Zero-Config.** The `AskChokro` wrapper auto-detects `DATABASE_URL`, `OPENAI_API_KEY`, and `ANTHROPIC_API_KEY` - and falls back to a local Ollama instance seamlessly when no keys are found.\n3. **AST-Level Security.** We don't just rely on prompt engineering. We parse the LLM's SQL into an Abstract Syntax Tree (AST), strictly validate it's a read-only `SELECT`, and *automatically rewrite the AST* to enforce tenant scoping before executing it.\n\n## Quick Start (Next.js App Router)\n\nInstall the core engine and the Next.js adapter:\n\n```bash\nnpm install @digitalchokro/askchokro @digitalchokro/adapter-nextjs @digitalchokro/provider-openai @digitalchokro/db-postgres\n```\n\nCreate a route handler at `app/api/ask/route.ts`:\n\n```typescript\n// app/api/ask/route.ts\nimport { AskChokro } from '@digitalchokro/askchokro';\nimport { createAskChokroRoute } from '@digitalchokro/adapter-nextjs';\n\n// Auto-detects process.env.DATABASE_URL and process.env.OPENAI_API_KEY\nconst agent = new AskChokro();\n\nexport const POST = createAskChokroRoute(agent);\n```\n\nOn your frontend:\n\n```javascript\nconst res = await fetch('/api/ask', {\n  method: 'POST',\n  body: JSON.stringify({ question: 'Who are my top 5 customers this month?' })\n});\n\nconst { answer, sql, rows } = await res.json();\nconsole.log(sql);  // \"SELECT name, SUM(amount) FROM orders GROUP BY name ORDER BY SUM(amount) DESC LIMIT 5\"\nconsole.table(rows);\n```\n\nThat's it. You just shipped AI data analytics.\n\n## Multi-Tenant Security (AST Rewriting)\n\nWhen embedding AI in B2B SaaS, tenant isolation is the hardest problem. Naive string-appending (`WHERE tenant_id = X`) fails when the AI generates subqueries or complex `JOIN`s that bypass the filter.\n\nAskChokro uses a sophisticated **AST Scope Rewriter**. \n\n```typescript\nimport { DatabaseAgent } from '@digitalchokro/core';\nimport { PostgresAdapter } from '@digitalchokro/db-postgres';\nimport { OpenAIProvider } from '@digitalchokro/provider-openai';\n\nconst agent = new DatabaseAgent({\n  db: new PostgresAdapter({ connectionString: process.env.DATABASE_URL }),\n  ai: new OpenAIProvider({ model: 'gpt-4o' }),\n  options: {\n    tenantScoping: {\n      enabled: true,\n      column: 'organization_id',\n      // Injects the current user's org ID from your request context\n      getValue: (ctx) => ctx.orgId, \n    }\n  }\n});\n```\n\nWith `tenantScoping` enabled, if the AI generates:\n```sql\nSELECT o.id, u.email FROM orders o JOIN users u ON o.user_id = u.id\n```\n\nAskChokro's AST rewriter physically intercepts the query, parses the syntax tree, and injects your tenant logic into *every* table reference before sending it to the database:\n```sql\nSELECT o.id, u.email \nFROM orders o \nJOIN users u ON o.user_id = u.id AND u.organization_id = 'org_123'\nWHERE o.organization_id = 'org_123'\n```\n\n*AskChokro dramatically reduces risk with a fail-closed design. See our [Security Guide](./docs/SECURITY.md) for full details on the 9-layer defense.*\n\n## Accuracy Benchmarks\n\nWe test AskChokro against a rigorous, open-source dataset of 198 complex SQL scenarios.\n\n| Model | Overall | Aggregations | Multi-Table JOINs | Tenant Scoping |\n|---|---|---|---|---|\n| **GPT-4o** | **95.9%** | 98% | 95% | 100% |\n| **Claude 3.5 Sonnet** | **96.5%** | 99% | 96% | 100% |\n| **Qwen 2.5 Coder (Local)** | **87.8%** | 88% | 85% | 100% |\n\n*(For full methodology, see our CI eval harness).*\n\n## Current Limitations\n\nAskChokro is designed to be simple and secure, which means it currently makes some intentional trade-offs:\n- **Multi-Part Questions Supported:** AskChokro safely handles disjoint, multi-part questions by mapping them into unified scalar subqueries. However, the root AST must ultimately resolve to a single SQL tabular structure to ensure compatibility across all database drivers.\n- **No DML (Mutations):** It is strictly read-only. `INSERT`, `UPDATE`, `DELETE`, and `DROP` are explicitly blocked at the AST level.\n- **Complex Aggregations:** While it handles joins and basic aggregations well, extremely complex window functions or recursive CTEs might confuse smaller local models.\n\n## Coming Soon: WordPress Plugin\n\nWe are actively developing an official **AskChokro WordPress Plugin**. \nThis will allow you to drop an AI data assistant directly into your WooCommerce dashboard with zero code. \n\n**The WordPress Roadmap:**\n- **Phase 1:** AskChokro Node.js Microservice (Pre-configured Docker container)\n- **Phase 2:** WordPress PHP Plugin (Settings UI & Gutenberg Blocks)\n- **Phase 3:** Automatic Tenant Isolation for Multi-Vendor setups\n\nRead the [Integration Architecture](https://github.com/digitalchokro/askchokro/blob/main/docs/INTEGRATION_ARCHITECTURE.md) to learn how this works behind the scenes.\n\n## Frequently Asked Questions (FAQ)\n\n\n\n## Documentation\n\n- [Quick Start](./docs/QUICK_START.md) - Full 5-minute integration guide.\n- [Security Model](./docs/SECURITY.md) - Deep dive into AST validation, column masking, and read-only sandboxes.\n- [Plugin Development](./docs/PLUGINS.md) - Learn how to build your own `AIProvider` or `DatabaseAdapter`.\n- [Integration Architecture](https://github.com/digitalchokro/askchokro/blob/main/docs/INTEGRATION_ARCHITECTURE.md) - Learn how to embed AskChokro across platforms.\n\n## Contributing\n\nWe are actively looking for contributors! Check out our [Contributing Guide](CONTRIBUTING.md) and look for issues tagged `good first issue`.\n\nIf you want to add support for MySQL, Gemini, Google Vertex, or Fastify, we have automated templates waiting for you.\n\n## License\n\nMIT © Digital Chokro\n","readmeFilename":"README.md","homepage":"https://github.com/digitalchokro/askchokro#readme","repository":{"type":"git","url":"git+https://github.com/digitalchokro/askchokro.git","directory":"packages/provider-gemini"},"bugs":{"url":"https://github.com/digitalchokro/askchokro/issues"}}