Files
vision-tool/config.yaml
Geliebte a3bbf33358 feat: 重构为 Go Web 脚手架——在线图片识别 Web 服务 + vision-cli 独立工具
- Gin + config.yaml + SQLite 后端骨架,JWT 登录 + 管理员初始化
- web/ 原生单页:拖拽多图上传 → Agnes 免费识别 → 结果复制
- HTTP API:/api/v1/vision/analyze 免鉴权 + 令牌桶限流,支持程序直调
- cmd/vision-cli 独立 CLI 工具(复用 service 层,不依赖 Web 服务)
- build.bat / build.sh 构建脚本,移除 mcp-server
- 统一响应格式 {code, message, data},CORS/JWT/限流中间件

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-12 23:59:17 +08:00

30 lines
848 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ========== 服务配置 ==========
server:
port: 8080
# ========== 数据库配置 ==========
database:
driver: sqlite # 当前仅支持 sqlite(pure-go,无需 CGO)
path: ./data/app.db
auto_migrate: true # 启动自动建表,生产环境建议 false
# ========== JWT 认证 ==========
jwt:
secret: "change-me-in-production"
expire_hours: 720 # Token 有效期(小时)
# ========== 文件上传 ==========
upload:
path: uploads
max_size: 10485760 # 单张图片最大 10MB
# ========== AI 视觉模型(Agnes 免费) ==========
ai:
api_key: "sk-68FL9xXRrJhxcY5TCGxoaFlQ94oCBioIJhyGfeDMCkCvA0SV"
base_url: "https://apihub.agnes-ai.com/v1/chat/completions"
model: "agnes-2.0-flash"
# ========== 环境配置 ==========
env:
name: dev # dev | prod