Files
assistant/.env.example
wangliang 965b11316e feat: 添加图片搜索功能和 Qwen 模型支持
图片搜索功能(以图搜图):
- Chatwoot webhook 检测图片搜索消息 (content_type="search_image")
- 从 content_attributes.url 提取图片 URL
- 调用 Mall API 图片搜索接口 (/mall/api/spu?searchImageUrl=...)
- 支持嵌套和顶层 URL 位置提取
- Product Agent 添加 fast path 直接调用图片搜索工具
- 防止无限循环(使用后清除 context.image_search_url)

Qwen 模型支持:
- 添加 LLM provider 选择(zhipu/qwen)
- 实现 QwenLLMClient 类(基于 DashScope SDK)
- 添加 dashscope>=1.14.0 依赖
- 修复 API key 设置(直接设置 dashscope.api_key)
- 更新 .env.example 和 docker-compose.yml 配置

其他优化:
- 重构 Chatwoot 集成代码(删除冗余)
- 优化 Product Agent prompt
- 增强 Customer Service Agent 多语言支持

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-27 19:10:06 +08:00

62 lines
1.7 KiB
Plaintext

# B2B Shopping AI Assistant Platform - Environment Variables
# ============ AI Model ============
# LLM Provider: 'zhipu' (default) or 'qwen'
LLM_PROVIDER=zhipu
# ZhipuAI (智谱 AI)
ZHIPU_API_KEY=your_zhipu_api_key
ZHIPU_MODEL=glm-4-flash
# Qwen (通义千问) - Alternative provider
QWEN_API_KEY=your_qwen_dashscope_api_key
QWEN_MODEL=qwen-omni-turbo
# Available Qwen models:
# - qwen-omni-turbo (多模态,支持图片/语音)
# - qwen-plus (通用模型)
# - qwen-turbo (高速模型)
# - qwen-long (长文本)
# - qwen-max (最强模型)
# ============ Redis ============
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_PASSWORD=your_redis_password
REDIS_DB=0
# ============ PostgreSQL (Chatwoot) ============
POSTGRES_HOST=postgres
POSTGRES_PORT=5432
POSTGRES_DB=chatwoot
POSTGRES_USER=chatwoot
POSTGRES_PASSWORD=your_postgres_password
# ============ Chatwoot ============
CHATWOOT_API_URL=http://chatwoot:3000
CHATWOOT_API_TOKEN=your_chatwoot_api_token
CHATWOOT_WEBHOOK_SECRET=your_webhook_secret
CHATWOOT_FRONTEND_URL=http://localhost:3000
CHATWOOT_SECRET_KEY_BASE=your_secret_key_base
# ============ Strapi CMS (FAQ/Knowledge Base) ============
STRAPI_API_URL=http://your-strapi:1337
STRAPI_API_TOKEN=your_strapi_api_token
# ============ Hyperf PHP API ============
HYPERF_API_URL=http://your-hyperf-api:9501
HYPERF_API_TOKEN=your_hyperf_api_token
# ============ MCP Servers ============
STRAPI_MCP_URL=http://strapi_mcp:8001
ORDER_MCP_URL=http://order_mcp:8002
AFTERSALE_MCP_URL=http://aftersale_mcp:8003
PRODUCT_MCP_URL=http://product_mcp:8004
# ============ Mall API ============
MALL_API_URL=https://apicn.qa1.gaia888.com
# ============ Agent Config ============
LOG_LEVEL=INFO
MAX_CONVERSATION_STEPS=10
CONVERSATION_TIMEOUT=3600