From 418d5e3001d145edfb506a69e41b59651052f58f Mon Sep 17 00:00:00 2001 From: aaron <> Date: Fri, 9 May 2025 16:23:47 +0800 Subject: [PATCH] update --- cryptoai/routes/agent.py | 21 +++++++++++++++++++-- docker-compose.yml | 2 +- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/cryptoai/routes/agent.py b/cryptoai/routes/agent.py index 6120246..72655a8 100644 --- a/cryptoai/routes/agent.py +++ b/cryptoai/routes/agent.py @@ -38,7 +38,19 @@ async def get_agents(current_user: Dict[str, Any] = Depends(get_current_user)): "name": "加密货币交易助手", "hello_prompt": "您好,我是加密货币交易助手,为您提供专业的数字货币交易分析和建议", "description": "帮你分析做加密货币技术分析", - } + }, + { + "id": "2", + "name": "美股交易助手", + "hello_prompt": "您好,我是美股交易助手,为您提供专业的股票交易分析和建议", + "description": "帮你分析做美股股票技术分析", + }, + # { + # "id": "3", + # "name": "期货交易助手", + # "hello_prompt": "您好,我是期货交易助手,为您提供专业的期货交易分析和建议", + # "description": "帮你分析做期货技术分析", + # } ] @@ -47,8 +59,13 @@ async def chat(request: ChatRequest,current_user: Dict[str, Any] = Depends(get_c """ 聊天接口 """ + if request.agent_id == "1": + token = "app-vhJecqbcLukf72g0uxAb9tcz" + elif request.agent_id == "2": + token = "app-FLIYXrCbbQIkwgXx02Y1Mxjg" + else: + raise HTTPException(status_code=400, detail="Invalid agent ID") - token = "app-vhJecqbcLukf72g0uxAb9tcz" url = "https://mate.aimateplus.com/v1/chat-messages" headers = { "Authorization": f"Bearer {token}", diff --git a/docker-compose.yml b/docker-compose.yml index 77d1271..e4cc555 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.8 + image: cryptoai-api:0.0.9 restart: always ports: - "8000:8000"