A powerful and interactive experimental platform for experimenting with large language models, built based on Next.js 14 and modern web technologies.
Generate results based on user input, supporting Latex expression rendering.
Images can be uploaded as context for dialogue.
The OpenAI model has the function of displaying token probabilities. It can obtain the probability of the currently selected token and provide multiple alternative tokens as well as their probabilities.
-
Interactive Chat Interface
- Real-time markdown editing and preview
- Role-based conversations
- Users can upload images for conversation.
- Under the OpenAI model, token probabilities can be displayed.
- Advanced message manipulation: reorder, copy, regenerate
- Expert Mode: enhanced editing and role controls
- Feedback and animations for seamless UX
- Model configuration and AI parameter tuning
- Responsive and accessible design
-
Rich Text Editor
- Advanced markdown with GitHub Flavored support
- KaTeX for LaTeX expressions
- Mermaid for diagram rendering
- Persistent content and live rendering
-
Modern User Experience
- Customizable and responsive UI
- Animations, notifications, and error handling
- Mobile-friendly with accessible components
-
Advanced Features
- IndexedDB persistence, multiple language support
- API integration and message history management
- Advanced logging and optimized API handling
- Internationalization and dynamic translations
- Framework: Next.js 14
- Languages: TypeScript
- Styling: Tailwind CSS, Radix UI
- State Management: Jotai
- Data Storage: IndexedDB with Dexie.js
- Internationalization: next-intl
src/
βββ actions/
βββ app/
βββ components/
β βββ playground/
β βββ ui/
βββ constants/
βββ db/
βββ hooks/
βββ i18n/
βββ stores/
βββ styles/
βββ utils/
- Node.js (LTS version)
- pnpm or npm
- 302.AI API Key
-
Clone the repository:
git clone https://github.com/302ai/302_llm_playground cd 302_llm_playground
-
Install dependencies:
pnpm install
-
Configure environment variables:
cp .env.example .env.local
AI_302_API_KEY
: Your 302.AI API keyAI_302_API_URL
: API endpoint
Start the development server:
pnpm dev
Visit http://localhost:3000 to see the application.
pnpm build
pnpm start
Build and run using Docker:
docker build -t llm_playground .
docker run -p 3000:3000 llm_playground
Contributions are welcome! Please feel free to submit issues and pull requests.
This project is licensed under the GNU Affero General Public License v3.0. See the LICENSE file for more details.
Built with β€οΈ using Next.js and 302.AI
302.AI is an enterprise-oriented AI application platform that offers pay-as-you-go services, ready-to-use solutions, and an open-source ecosystem.β¨
- π§ Comprehensive AI capabilities: Incorporates the latest in language, image, audio, and video models from leading AI brands.
- π Advanced application development: We build genuine AI products, not just simple chatbots.
- π° No monthly fees: All features are pay-per-use, fully accessible, ensuring low entry barriers with high potential.
- π οΈ Powerful admin dashboard: Designed for teams and SMEs - managed by one, used by many.
- π API access for all AI features: All tools are open-source and customizable (in progress).
- π‘ Powerful development team: Launching 2-3 new applications weekly with daily product updates. Interested developers are welcome to contact us.