mirror of
https://gitee.com/infiniflow/ragflow.git
synced 2025-12-06 15:29:03 +08:00
Fix:The OpenAI-Compatible Agent API returns an incorrect message (#8177)
### What problem does this PR solve? https://github.com/infiniflow/ragflow/issues/8175 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@@ -169,6 +169,7 @@ class Canvas:
|
||||
def run(self, running_hint_text = "is running...🕞", **kwargs):
|
||||
if not running_hint_text or not isinstance(running_hint_text, str):
|
||||
running_hint_text = "is running...🕞"
|
||||
bypass_begin = bool(kwargs.get("bypass_begin", False))
|
||||
|
||||
if self.answer:
|
||||
cpn_id = self.answer[0]
|
||||
@@ -188,6 +189,12 @@ class Canvas:
|
||||
if not self.path:
|
||||
self.components["begin"]["obj"].run(self.history, **kwargs)
|
||||
self.path.append(["begin"])
|
||||
if bypass_begin:
|
||||
cpn = self.get_component("begin")
|
||||
downstream = cpn["downstream"]
|
||||
self.path.append(downstream)
|
||||
|
||||
|
||||
|
||||
self.path.append([])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user