22Nikk0 commited on
Commit
2a75c0d
·
verified ·
1 Parent(s): 1a4fab5

Update agentic.py

Browse files
Files changed (1) hide show
  1. agentic.py +7 -8
agentic.py CHANGED
@@ -288,7 +288,7 @@ search_tools = [
288
 
289
  download_file_tool = [ download_input_file ]
290
 
291
- web_search_node_agent = big_model.bind_tools(search_tools, parallel_tool_calls=False)
292
 
293
  def thinking_node(state: State) -> dict:
294
  """
@@ -371,7 +371,7 @@ Now provide your response immediately without any preamble in text but not in ma
371
 
372
  sys_msg = SystemMessage(content=prompt)
373
 
374
- code_node_response = [big_model.invoke([sys_msg])]
375
 
376
  code_node_response[-1].pretty_print()
377
 
@@ -919,8 +919,8 @@ if __name__ == "__main__":
919
 
920
  agent_graph = build_graph()
921
 
922
- with open("image.png", "wb") as png:
923
- png.write(agent_graph.get_graph(xray=True).draw_mermaid_png())
924
 
925
  # print(vision_node.__doc__)
926
 
@@ -928,10 +928,9 @@ if __name__ == "__main__":
928
  json_responses = json.loads(responses.read())
929
 
930
  json_questions = [{
931
- "task_id": "840bfca7-4f7b-481a-8794-c560c340185d",
932
- "question": "On June 6, 2023, an article by Carolyn Collins Petersen was published in Universe Today. This article mentions a team that produced a paper about their observations, linked at the bottom of the article. Find this paper. Under what NASA award number was the work performed by R. G. Arendt supported by?",
933
- "Level": "1",
934
- "file_name": ""
935
  }]
936
 
937
  # with open("questions.json", "r") as questions:
 
288
 
289
  download_file_tool = [ download_input_file ]
290
 
291
+ web_search_node_agent = general_model.bind_tools(search_tools, parallel_tool_calls=False)
292
 
293
  def thinking_node(state: State) -> dict:
294
  """
 
371
 
372
  sys_msg = SystemMessage(content=prompt)
373
 
374
+ code_node_response = [general_model.invoke([sys_msg])]
375
 
376
  code_node_response[-1].pretty_print()
377
 
 
919
 
920
  agent_graph = build_graph()
921
 
922
+ # with open("image.png", "wb") as png:
923
+ # png.write(agent_graph.get_graph(xray=True).draw_mermaid_png(draw_method=MermaidDrawMethod.PYPPETEER))
924
 
925
  # print(vision_node.__doc__)
926
 
 
928
  json_responses = json.loads(responses.read())
929
 
930
  json_questions = [{
931
+ "question": "The attached Excel file contains the sales of menu items for a local fast-food chain. What were the total sales that the chain made from food (not including drinks)? Express your answer in USD with two decimal places.",
932
+ "file_name": "7bd855d8-463d-4ed5-93ca-5fe35145f733.xlsx",
933
+ "task_id": "7bd855d8-463d-4ed5-93ca-5fe35145f733"
 
934
  }]
935
 
936
  # with open("questions.json", "r") as questions: