jihuaqiang 3 هفته پیش
والد
کامیت
dca7446875
1فایلهای تغییر یافته به همراه1 افزوده شده و 6 حذف شده
  1. 1 6
      agents/store_agent/agent.py

+ 1 - 6
agents/store_agent/agent.py

@@ -78,12 +78,7 @@ def _upload_chunk(text: str, query: str, channel: str = "", max_retries: int = 3
             # 以 GET 方法发送,body 为 JSON 字符串
             body = json.dumps(payload, ensure_ascii=False).encode('utf-8')
             resp = requests.post(CHUNK_API_URL, headers=headers, data=body, timeout=30)
-            logger.info(f"上传chunk请求体: payload={payload}")
-            try:
-                logger.info(f"上传chunk成功: resp={resp.json()}")
-            except Exception:
-                logger.info(f"上传chunk返回非JSON: text={resp.text[:500]}")
-            if resp.status_code >= 200 and resp.status_code < 300:
+            if resp.json().get("doc_id"):
                 return True
             logger.warning(f"上传失败,状态码: {resp.status_code}, 第{attempt+1}次重试")
         except Exception as e: