WeByT3 commited on
Commit
e64540d
·
verified ·
1 Parent(s): e04cf15

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +4 -1
agent.py CHANGED
@@ -20,7 +20,7 @@ def build_agent():
20
  }
21
 
22
  def enhancer(state: MessagesState):
23
- sys_msg = """You are a reasoning assistant that can answer complex questions using external tools. You must follow a structured reasoning format and always output a final answer.
24
  Always follow this step-by-step structure:
25
  - Thought: Describe your reasoning.
26
  - Action: Call a tool, using this format → Action: tool_name(input)
@@ -33,6 +33,9 @@ def build_agent():
33
  - If a string: no articles, no abbreviations, digits in plain text.
34
  - If a comma-separated list: apply the above rules to each element.
35
  - Only include the final answer, do not include any reasoning steps."""
 
 
 
36
  return {
37
  "messages": [sys_msg] + state["messages"]
38
  }
 
20
  }
21
 
22
  def enhancer(state: MessagesState):
23
+ system_prompt = """You are a reasoning assistant that can answer complex questions using external tools. You must follow a structured reasoning format and always output a final answer.
24
  Always follow this step-by-step structure:
25
  - Thought: Describe your reasoning.
26
  - Action: Call a tool, using this format → Action: tool_name(input)
 
33
  - If a string: no articles, no abbreviations, digits in plain text.
34
  - If a comma-separated list: apply the above rules to each element.
35
  - Only include the final answer, do not include any reasoning steps."""
36
+
37
+ sys_msg = SystemMessage(content=system_prompt)
38
+
39
  return {
40
  "messages": [sys_msg] + state["messages"]
41
  }