Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.
fix the _extract_thought (#2398)
Arthur Chienb766af75f2b5
diff --git a/src/crewai/agents/parser.py b/src/crewai/agents/parser.pyindex 1bda4df5c..05c5bc003 100644--- a/src/crewai/agents/parser.py+++ b/src/crewai/agents/parser.py@@ -124,9 +124,9 @@ class CrewAgentParser:)def _extract_thought(self, text: str) -> str:- thought_index = text.find("\n\nAction")+ thought_index = text.find("\nAction")if thought_index == -1:- thought_index = text.find("\n\nFinal Answer")+ thought_index = text.find("\nFinal Answer")if thought_index == -1:return ""thought = text[:thought_index].strip()