IamRulo commited on
Commit
38836ea
·
verified ·
1 Parent(s): 58972a2

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +4 -3
agent.py CHANGED
@@ -122,8 +122,7 @@ def arvix_search(query: str) -> str:
122
  # system_prompt = f.read()
123
 
124
  system_prompt = """You are a helpful assistant tasked with answering questions using a set of tools.
125
- Now, I will ask you a question. Report your thoughts, and finish your answer with the following template:
126
- FINAL ANSWER: [YOUR FINAL ANSWER].
127
  YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of numbers and/or strings.
128
  If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise.
129
  If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise.
@@ -202,7 +201,9 @@ def build_graph(provider: str = "huggingface"):
202
  def assistant(state: MessagesState):
203
  """Assistant node"""
204
 
205
- return {"messages": [llm_with_tools.invoke([sys_msg] + state["messages"])]}
 
 
206
  """
207
  def retriever(state: MessagesState):
208
  #Retriever node
 
122
  # system_prompt = f.read()
123
 
124
  system_prompt = """You are a helpful assistant tasked with answering questions using a set of tools.
125
+ Now, I will ask you a question. Report your thoughts, and finish your answer with the following template: FINAL ANSWER: [YOUR FINAL ANSWER].
 
126
  YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of numbers and/or strings.
127
  If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise.
128
  If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise.
 
201
  def assistant(state: MessagesState):
202
  """Assistant node"""
203
 
204
+ #return {"messages": [llm_with_tools.invoke([sys_msg] + state["messages"])]}
205
+ return {"messages": [llm_with_tools.invoke([sys_msg])]}
206
+
207
  """
208
  def retriever(state: MessagesState):
209
  #Retriever node