Skip to content
Snippets Groups Projects
Unverified Commit d569009a authored by Daniel Bustamante Ospina's avatar Daniel Bustamante Ospina Committed by GitHub
Browse files

Fix the error raised when ReactAgent is created without an explicit system message (#18041)

parent 3dee9641
No related branches found
No related tags found
No related merge requests found
......@@ -28,9 +28,9 @@ from llama_index.core.tools import AsyncBaseTool
from llama_index.core.workflow import Context
def default_formatter() -> ReActChatFormatter:
def default_formatter(fields: dict) -> ReActChatFormatter:
"""Sets up a default formatter so that the proper react header is set."""
return ReActChatFormatter.from_defaults(context="some context")
return ReActChatFormatter.from_defaults(context=fields["system_prompt"])
class ReActAgent(SingleAgentRunnerMixin, BaseWorkflowAgent):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment