Преглед на файлове

fix: react router agent direct output (#904)

takatost преди 1 година
родител
ревизия
edb06f6aed
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      api/core/completion.py

+ 1 - 1
api/core/completion.py

@@ -126,7 +126,7 @@ class Completion:
         # the output of the agent can be used directly as the main output content without calling LLM again
         fake_response = None
         if not app_model_config.pre_prompt and agent_execute_result and agent_execute_result.output \
-                and agent_execute_result.strategy != PlanningStrategy.ROUTER:
+                and agent_execute_result.strategy not in [PlanningStrategy.ROUTER, PlanningStrategy.REACT_ROUTER]:
             fake_response = agent_execute_result.output
 
         # get llm prompt