diff --git a/app/core/stylist_agent_server.py b/app/core/stylist_agent_server.py index e373785..5366f07 100644 --- a/app/core/stylist_agent_server.py +++ b/app/core/stylist_agent_server.py @@ -298,7 +298,6 @@ class AsyncStylistAgent: self.stop_reason = "Finish reason: " + gemini_data.get('reason', 'No reason provided') response_data['status'] = "stop" response_data['message'] = self.stop_reason - break # 4. 处理推荐单品 if gemini_data.get('action') == 'recommend_item': @@ -350,14 +349,12 @@ class AsyncStylistAgent: break if len(self.outfit_items) >= self.max_len: # 设置一个最大循环限制,防止无限循环 - print("🚨 达到最大搭配数量限制,强制终止。") + logger.info("🚨 达到最大搭配数量限制,强制终止。") self.stop_reason = "Finish reason: Reached max outfit length." response_data['status'] = "stop" response_data['message'] = self.stop_reason - logger.info(response_data) - break - logger.info(response_data) + logger.info(f"request data :{response_data}") headers = { 'Accept': "*/*", 'Accept-Encoding': "gzip, deflate, br",