EtienneB commited on
Commit
aaf4112
Β·
1 Parent(s): 4f3eff1
Files changed (2) hide show
  1. agent.py +6 -5
  2. system-prompt-claude-2.txt +1 -1
agent.py CHANGED
@@ -8,10 +8,10 @@ from langchain_huggingface import ChatHuggingFace, HuggingFaceEndpoint
8
  from langgraph.graph import START, MessagesState, StateGraph
9
  from langgraph.prebuilt import ToolNode, tools_condition
10
 
11
- from tools import (absolute, add, analyze_csv_file, analyze_excel_file,
12
- arvix_search, audio_transcription, compound_interest,
13
- convert_temperature, divide, download_file, exponential,
14
- extract_text_from_image, factorial, floor_divide,
15
  get_current_time_in_timezone, greatest_common_divisor,
16
  is_prime, least_common_multiple, logarithm, modulus,
17
  multiply, percentage_calculator, power, python_code_parser,
@@ -32,7 +32,8 @@ tools = [
32
  is_prime, least_common_multiple, percentage_calculator,
33
  wikipedia_search, analyze_excel_file, arvix_search,
34
  audio_transcription, python_code_parser, analyze_csv_file,
35
- extract_text_from_image, reverse_sentence, web_content_extract,
 
36
  download_file,
37
  ]
38
 
 
8
  from langgraph.graph import START, MessagesState, StateGraph
9
  from langgraph.prebuilt import ToolNode, tools_condition
10
 
11
+ from tools import (absolute, add, analyze_csv_file, # extract_text_from_image,
12
+ analyze_excel_file, arvix_search, audio_transcription,
13
+ compound_interest, convert_temperature, divide,
14
+ download_file, exponential, factorial, floor_divide,
15
  get_current_time_in_timezone, greatest_common_divisor,
16
  is_prime, least_common_multiple, logarithm, modulus,
17
  multiply, percentage_calculator, power, python_code_parser,
 
32
  is_prime, least_common_multiple, percentage_calculator,
33
  wikipedia_search, analyze_excel_file, arvix_search,
34
  audio_transcription, python_code_parser, analyze_csv_file,
35
+ # extract_text_from_image,
36
+ reverse_sentence, web_content_extract,
37
  download_file,
38
  ]
39
 
system-prompt-claude-2.txt CHANGED
@@ -96,7 +96,7 @@ You are an advanced AI agent equipped with multiple tools to solve complex, mult
96
  - **File Processing Priority**: Always download and process files before attempting to answer questions about them
97
  - **Mathematical Chains**: Combine mathematical operations as needed (e.g., add β†’ multiply β†’ percentage_calculator)
98
  - **Information + Processing**: Combine search tools with processing tools (e.g., web_search β†’ extract_text_from_image β†’ analyze_csv_file)
99
- - **Text Transformations**: Use text processing tools before analysis (e.g., reverse_sentence β†’ python_code_parser)
100
  - **Pattern Recognition**: Look for hidden patterns, instructions, or transformations within questions
101
 
102
  ## Response Format
 
96
  - **File Processing Priority**: Always download and process files before attempting to answer questions about them
97
  - **Mathematical Chains**: Combine mathematical operations as needed (e.g., add β†’ multiply β†’ percentage_calculator)
98
  - **Information + Processing**: Combine search tools with processing tools (e.g., web_search β†’ extract_text_from_image β†’ analyze_csv_file)
99
+ - **Text Transformations**: Use text processing tools before analysis (e.g., reverse_sentence β†’ python_code_parser). In other words, first reverse the text when needed and then re-read the adjusted question.
100
  - **Pattern Recognition**: Look for hidden patterns, instructions, or transformations within questions
101
 
102
  ## Response Format