A powerful and interactive experimental platform for experimenting with large language models, built based on Next.js 14 and modern web technologies.
This project is a derivative work based on 302ai/302_llm_playground
中文 | English | 日本語 | Русский | Français | Deutsch

Generate results based on user input, supporting Latex expression rendering.

Images can be uploaded as context for dialogue.

Support chart rendering.

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
Rich Text Editor
Modern User Experience
Advanced Features
src/ ├── actions/ ├── app/ ├── components/ │ ├── playground/ │ └── ui/ ├── constants/ ├── db/ ├── hooks/ ├── i18n/ ├── stores/ ├── styles/ └── utils/
Clone the repository:
git clone https://github.com/xiaomizhoubaobei/LLM-Playground
cd 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 endpointStart the development server:
pnpm dev
Visit http://localhost:3000 to see the application.
pnpm build pnpm start
qixiaoxin/iflow-cartoonize-apighcr.io/xiaomizhoubaobei/llm_playgroundcrpi-wk2d8umombj539de.cn-shanghai.personal.cr.aliyuncs.com/xmz-1/302_llm_playground# Using DockerHub image
docker pull qixiaoxin/iflow-cartoonize-api:latest
docker run -p 3000:3000 qixiaoxin/iflow-cartoonize-api:latest
# Using GHCR image
docker pull ghcr.io/xiaomizhoubaobei/llm_playground:latest
docker run -p 3000:3000 ghcr.io/xiaomizhoubaobei/llm_playground:latest
# Using Alibaba Cloud image
docker pull crpi-wk2d8umombj539de.cn-shanghai.personal.cr.aliyuncs.com/xmz-1/302_llm_playground:latest
docker run -p 3000:3000 crpi-wk2d8umombj539de.cn-shanghai.personal.cr.aliyuncs.com/xmz-1/302_llm_playground:latest
docker build -t llm_playground . docker run -p 3000:3000 llm_playground
⚠️ Important: The Docker image requires a real 302.AI API key to function properly at runtime.
docker run -d \ -e AI_302_API_KEY=your-actual-api-key \ -e AI_302_API_URL=https://api.302.ai \ -e NEXT_PUBLIC_AI_302_API_UPLOAD_URL=https://dash-api.302.ai/gpt/api/upload/gpt/image \ -p 3000:3000 \ llm_playground:latest
Environment Variables:
| Variable | Description | Required |
|---|---|---|
AI_302_API_KEY | 302.AI API key | ✅ Yes |
AI_302_API_URL | API service URL | ✅ Yes |
NEXT_PUBLIC_AI_302_API_UPLOAD_URL | File upload URL | ✅ Yes |
Get API key: https://302.ai/en/apis/
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