gongxiangp2/yedir/start-test-server.sh
chenpei d0dc94e36d feat: 将弹幕功能替换为AI聊天助手
新功能:
- 创建AI聊天助手组件(AIChatWidget)
- 支持文字+图片多模态对话
- 集成Gemini AI API
- 支持图片编辑和内容生成
- 实时对话历史管理
- 优雅的UI设计,支持黑夜模式

技术实现:
- 后端API代理Gemini API(/api/ai-chat)
- 支持最多5张图片上传
- 流式响应处理
- 对话历史管理
- Base64图片处理

配置:
- 在.env中添加Gemini API配置
- GEMINI_API_KEY
- GEMINI_API_BASE_URL
- GEMINI_MODEL

替换原弹幕功能,提供更强大的AI助手体验!
2025-10-27 17:45:37 +08:00

20 lines
667 B
Bash
Executable File

#!/bin/bash
# 检查是否已经有测试服务器在运行
if pgrep -f "node test-api-routes.js" > /dev/null; then
echo "测试服务器已经在运行"
else
echo "启动测试服务器..."
nohup node test-api-routes.js > test-server.log 2>&1 &
echo "测试服务器已在后台启动,日志保存在 test-server.log"
fi
# 等待服务器启动
sleep 2
# 检查服务器是否成功启动
if curl -s http://localhost:3456/test > /dev/null; then
echo "测试服务器运行正常,可以访问 http://localhost:3456/admin/api-test.html 进行测试"
else
echo "测试服务器可能未成功启动,请检查 test-server.log 文件"
fi