feat: 添加GLM-4.5V和DashScope模型支持,优化饮食分析服务的API调用

This commit is contained in:
richarjiang
2025-09-04 10:16:24 +08:00
parent d34f752776
commit 97e6a0ff6d
2 changed files with 129 additions and 47 deletions

24
.env.glm.example Normal file
View File

@@ -0,0 +1,24 @@
# GLM-4.5V Configuration Example
# Copy this to your .env file and update with your actual API key
# AI Vision Provider - set to 'glm' to use GLM-4.5V, 'dashscope' for Qwen (default)
AI_VISION_PROVIDER=glm
# GLM-4.5V API Configuration
GLM_API_KEY=your_glm_api_key_here
GLM_BASE_URL=https://open.bigmodel.cn/api/paas/v4
# GLM Model Names
GLM_MODEL=glm-4-flash
GLM_VISION_MODEL=glm-4v-plus
# Alternative: Use GLM-4.5V models (if available)
# GLM_MODEL=glm-4.5
# GLM_VISION_MODEL=glm-4.5v
# DashScope Configuration (fallback/default)
# Keep these for fallback or if you want to switch between providers
DASHSCOPE_API_KEY=your_dashscope_api_key_here
DASHSCOPE_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
DASHSCOPE_MODEL=qwen-flash
DASHSCOPE_VISION_MODEL=qwen-vl-max