From 9228e02cbeb405e7118b605b208728aeffc41228 Mon Sep 17 00:00:00 2001 From: aaron <> Date: Sun, 11 May 2025 00:10:40 +0800 Subject: [PATCH] update --- cryptoai/routes/agent.py | 4 ++++ docker-compose.yml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cryptoai/routes/agent.py b/cryptoai/routes/agent.py index 0cabdf3..5e7136e 100644 --- a/cryptoai/routes/agent.py +++ b/cryptoai/routes/agent.py @@ -26,6 +26,7 @@ router = APIRouter() class ChatRequest(BaseModel): user_prompt: str agent_id: int + conversation_id: Optional[str] = None class AgentCreate(BaseModel): name: str @@ -117,6 +118,9 @@ async def chat(request: ChatRequest, current_user: Dict[str, Any] = Depends(get_ "user": current_user["mail"] } + if request.conversation_id: + data["conversation_id"] = request.conversation_id + logging.info(f"Chat request data: {data}") # 保存用户提问 diff --git a/docker-compose.yml b/docker-compose.yml index 499db9f..075973c 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.12 + image: cryptoai-api:0.0.13 restart: always ports: - "8000:8000"