22Nikk0 commited on
Commit
5cd1128
·
verified ·
1 Parent(s): a2d0c8b

Update agentic.py

Browse files
Files changed (1) hide show
  1. agentic.py +0 -71
agentic.py CHANGED
@@ -873,74 +873,3 @@ if __name__ == "__main__":
873
  answer = regex_result.group("answer")
874
 
875
  print(answer)
876
-
877
- # with open("./questions.json", "r") as file:
878
- # questions_json = json.loads(file.read())
879
-
880
- # for question_json in questions_json:
881
- # question = question_json.get("question", "")
882
- # file_name = question_json.get("file_name", "")
883
-
884
- # print(f"QUESTION : {question}")
885
- # print(f"FILE: {file_name}")
886
-
887
- # messages = [HumanMessage(content=f"Can you answer this question please ? {question}")]
888
-
889
- # messages = agent_graph.invoke(
890
- # input={"messages": messages, "question": question, "input_file": file_name},
891
- # config={
892
- # "recursion_limit": 10,
893
- # "callbacks": [langfuse_handler]
894
- # }
895
- # )
896
-
897
- # for m in messages['messages']:
898
- # m.pretty_print()
899
-
900
- # try:
901
- # regex_result = re.search(r"FINAL ANSWER:\s*(?P<answer>.*)$", messages['messages'][-1].content)
902
- # answer = regex_result.group("answer")
903
- # except:
904
- # regex_result = re.search(r"\s*(?P<answer>.*)$", messages['messages'][-1].content)
905
- # answer = regex_result.group("answer")
906
-
907
- # print(answer)
908
- # time.sleep(10)
909
-
910
- # def test():
911
- # # System message
912
- # textual_description_of_tool=f"""
913
- # web_search:
914
- # {web_search.description}
915
- # Args:
916
- # {web_search.args_schema.__doc__}
917
- # {web_search.args_schema.__annotations__}
918
- # Returns:
919
- # response_format: {web_search.response_format}
920
-
921
- # wikipedia_search:
922
- # {wikipedia_search.description}
923
- # Args:
924
- # {wikipedia_search.args_schema.__doc__}
925
- # {wikipedia_search.args_schema.__annotations__}
926
- # Returns:
927
- # response_format: {wikipedia_search.response_format}
928
-
929
- # vision_model_call:
930
- # {vision_model_call.__doc__}
931
- # Args:
932
- # {vision_model_call.__annotations__}
933
- # Returns:
934
- # {vision_model_call.__annotations__['return']}
935
-
936
- # video_handler_model_call:
937
- # {video_handler_model_call.__doc__}
938
- # Args:
939
- # {video_handler_model_call.__annotations__}
940
- # Returns:
941
- # {video_handler_model_call.__annotations__['return']}
942
- # """
943
-
944
- # pprint(textual_description_of_tool)
945
-
946
- # pprint(web_search.__annotations__)
 
873
  answer = regex_result.group("answer")
874
 
875
  print(answer)