refactor: 移除llm.invoke中冗余的need_retry参数
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user