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"