A modern AI-powered chatbot application built with SvelteKit, integrating OpenAI's LLM APIs for intelligent conversations. Designed with scalability, performance, and developer productivity in mind.
.env
filesClone the repository:
git clone https://github.com/your-username/sveltekit-ai-chatbot.git
cd sveltekit-ai-chatbot
Install dependencies:
npm install
Configure environment:
.env.example
to .env
OPENAI_API_KEY=your_openai_key
Start the development server:
npm run dev
Navigate to http://localhost:5173
sveltekit-ai-chatbot/
โ
โโโ src/
โ โโโ routes/ # SvelteKit pages and endpoints
โ โโโ lib/ # Reusable components and logic
โ โโโ app.html # App HTML template
โ โโโ app.d.ts # Type declarations
โ
โโโ .env.example # Example env variables
โโโ package.json # Project metadata and scripts
โโโ svelte.config.js # SvelteKit config
โโโ tailwind.config.js # Tailwind CSS config
โโโ vite.config.ts # Vite bundler config
npm run dev
โ Run development servernpm run build
โ Build the production-ready appnpm run preview
โ Preview the production buildnpm run lint
โ Lint the project with ESLintYou can deploy to any platform that supports Node.js. For example:
Make sure to add your environment variables in the platform's settings panel.
This project is licensed under the MIT License. See the LICENSE file for more details.
Contributions are welcome! Please fork the repository and submit a pull request.
Q: What model does this chatbot use?
A: It uses OpenAI models like gpt-3.5-turbo
or gpt-4
based on your configuration.
Q: Is it possible to use other LLMs like Claude or Gemini?
A: Yes, with minor adjustments to API calls in the backend route logic.