From 1a2c1b3d05b16941e3600c3f3846b97ab72ccb78 Mon Sep 17 00:00:00 2001 From: aaron <> Date: Sun, 11 May 2025 11:13:38 +0800 Subject: [PATCH] update --- cryptoai/routes/agent.py | 24 +++--------------------- docker-compose.yml | 2 +- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/cryptoai/routes/agent.py b/cryptoai/routes/agent.py index 5e7136e..3e2b72c 100644 --- a/cryptoai/routes/agent.py +++ b/cryptoai/routes/agent.py @@ -62,25 +62,8 @@ async def get_agents( """ 获取所有代理 """ - # # 检查用户权限 - # if current_user.get("level", 0) < 2: # 假设需要SVIP权限才能查看全部Agent - # # 使用硬编码的默认Agent - # return [ - # { - # "id": "1", - # "name": "Crypto Assistant", - # "hello_prompt": "您好,我是加密货币交易助手,为您提供专业的数字货币交易分析和建议", - # "description": "帮你分析做加密货币技术分析", - # }, - # { - # "id": "2", - # "name": "US Stock Assistant", - # "hello_prompt": "您好,我是美股交易助手,您可以直接输入股票名称,比如AAPL,然后我会为您提供专业的股票交易分析和建议", - # "description": "帮你分析做美股股票技术分析", - # }, - # ] - # else: - # 从数据库获取Agent列表 + + # 从数据库获取Agent列表 agents = get_db_manager().list_agents(limit=limit, skip=skip) return agents @@ -100,8 +83,7 @@ async def chat(request: ChatRequest, current_user: Dict[str, Any] = Depends(get_ token = agent.get("dify_token") inputs = agent.get("inputs") or {} - if agent.get("id") == 2: - inputs["current_date"] = datetime.now().strftime("%Y-%m-%d") + inputs["current_date"] = datetime.now().strftime("%Y-%m-%d") except ValueError: raise HTTPException(status_code=400, detail="Invalid agent ID format") diff --git a/docker-compose.yml b/docker-compose.yml index 075973c..b14baeb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,7 +29,7 @@ services: cryptoai-api: build: . container_name: cryptoai-api - image: cryptoai-api:0.0.13 + image: cryptoai-api:0.0.14 restart: always ports: - "8000:8000"