refactor: 移除llm.invoke中冗余的need_retry参数

This commit is contained in:
2025-09-15 16:54:55 +08:00
parent 0f11b0ba5e
commit 0541db1e34
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ class DifyCompareTest:
return "回答基本不相同"
while retry_count < max_retries:
try:
response = self.llm.invoke(user_prompt=user_prompt, need_retry=False, response_format={"type": "json_object"})
response = self.llm.invoke(user_prompt=user_prompt, response_format={"type": "json_object"})
response.content = response.content.strip()
clean_output = re.sub(r'<think>.*?</think>', '', response.content, flags=re.DOTALL)
result = JsonOutputParser().parse(clean_output)