{"id":18429093,"url":"https://github.com/lancedb/lancedb-vercel-chatbot","last_synced_at":"2025-04-07T17:32:35.479Z","repository":{"id":185716479,"uuid":"673986788","full_name":"lancedb/lancedb-vercel-chatbot","owner":"lancedb","description":"Build an AI chatbot with website context retrieved from a vector store like LanceDB.","archived":false,"fork":false,"pushed_at":"2024-03-26T18:27:42.000Z","size":386,"stargazers_count":82,"open_issues_count":1,"forks_count":21,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-03-22T21:51:09.563Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://lancedb-vercel-chatbot-liard.vercel.app","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/lancedb.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}},"created_at":"2023-08-02T22:11:03.000Z","updated_at":"2025-02-15T23:02:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"74d29d3b-a58c-4c48-9968-92bb55d37622","html_url":"https://github.com/lancedb/lancedb-vercel-chatbot","commit_stats":null,"previous_names":["lancedb/lancedb-vercel-chatbot","lancedb/lancedb-nextjs-chatbot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lancedb%2Flancedb-vercel-chatbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lancedb%2Flancedb-vercel-chatbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lancedb%2Flancedb-vercel-chatbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lancedb%2Flancedb-vercel-chatbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lancedb","download_url":"https://codeload.github.com/lancedb/lancedb-vercel-chatbot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247697928,"owners_count":20981273,"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":"2024-11-06T05:15:48.740Z","updated_at":"2025-04-07T17:32:35.167Z","avatar_url":"https://github.com/lancedb.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LanceDB Chatbot - Vercel Next.js Template\nUse an AI chatbot with website context retrieved from a vector store like LanceDB. LanceDB is lightweight and can be embedded directly into Next.js, with data stored on-prem.\n\n## One click deploy on Vercel\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Flancedb%2Flancedb-vercel-chatbot\u0026env=OPENAI_API_KEY\u0026envDescription=OpenAI%20API%20Key%20for%20chat%20completion.\u0026project-name=lancedb-vercel-chatbot\u0026repository-name=lancedb-vercel-chatbot\u0026demo-title=LanceDB%20Chatbot%20Demo\u0026demo-description=Demo%20website%20chatbot%20with%20LanceDB.\u0026demo-url=https%3A%2F%2Flancedb.vercel.app\u0026demo-image=https%3A%2F%2Fi.imgur.com%2FazVJtvr.png)\n\n![Demo website landing page](./landing_page.png)\n\n## Development\n\nFirst, rename `.env.example` to `.env.local`, and fill out `OPENAI_API_KEY` with your OpenAI API key. You can get one [here](https://openai.com/blog/openai-api).\n\nRun the development server:\n\n```bash\nnpm run dev\n# or\nyarn dev\n# or\npnpm dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) with your browser to see the result.\n\nThis project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.\n\n## Learn More\n\nTo learn more about LanceDB or Next.js, take a look at the following resources:\n\n- [LanceDB Documentation](https://lancedb.github.io/lancedb/) - learn about LanceDB, the developer-friendly serverless vector database.\n- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.\n- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.\n\n## LanceDB on Next.js and Vercel\n\nFYI: these configurations have been pre-implemented in this template.\n\nSince LanceDB contains a prebuilt Node binary, you must configure `next.config.js` to exclude it from webpack. This is required for both using Next.js and deploying on Vercel.\n```js\n/** @type {import('next').NextConfig} */\nmodule.exports = ({\n  webpack(config) {\n    config.externals.push({ vectordb: 'vectordb' })\n    return config;\n  }\n})\n```\n\nTo deploy on Vercel, we need to make sure that the NodeJS runtime static file analysis for Vercel can find the binary, since LanceDB uses dynamic imports by default. We can do this by modifying `package.json` in the `scripts` section.\n```json\n{\n  ...\n  \"scripts\": {\n    ...\n    \"vercel-build\": \"sed -i 's/nativeLib = require(`@lancedb\\\\/vectordb-\\\\${currentTarget()}`);/nativeLib = require(`@lancedb\\\\/vectordb-linux-x64-gnu`);/' node_modules/vectordb/native.js \u0026\u0026 next build\",\n    ...\n  },\n  ...\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flancedb%2Flancedb-vercel-chatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flancedb%2Flancedb-vercel-chatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flancedb%2Flancedb-vercel-chatbot/lists"}