Fix: sanitized tool names for LangChain compliance
Browse files
agent.py
CHANGED
@@ -99,22 +99,22 @@ def total_sales_from_excel(file_path: str) -> str:
|
|
99 |
## ----- TOOL LIST ----- ##
|
100 |
|
101 |
tools = [
|
102 |
-
Tool.from_function(add_numbers, name="
|
103 |
-
Tool.from_function(subtract_numbers, name="
|
104 |
-
Tool.from_function(multiply_numbers, name="
|
105 |
-
Tool.from_function(divide_numbers, name="
|
106 |
Tool.from_function(power, name="Power", description="Raise one number to the power of another."),
|
107 |
Tool.from_function(modulus, name="Modulus", description="Compute the modulus (remainder) of a division."),
|
108 |
-
Tool.from_function(square_root, name="
|
109 |
Tool.from_function(logarithm, name="Logarithm", description="Compute the logarithm of a number with a given base."),
|
110 |
web_search_tool,
|
111 |
wikipedia_tool,
|
112 |
arxiv_tool,
|
113 |
-
Tool.from_function(transcribe_audio, name="
|
114 |
-
Tool.from_function(get_youtube_transcript, name="
|
115 |
-
Tool.from_function(extract_text_from_image, name="
|
116 |
-
Tool.from_function(execute_python_code, name="
|
117 |
-
Tool.from_function(total_sales_from_excel, name="
|
118 |
]
|
119 |
|
120 |
## ----- SYSTEM PROMPT ----- ##
|
|
|
99 |
## ----- TOOL LIST ----- ##
|
100 |
|
101 |
tools = [
|
102 |
+
Tool.from_function(add_numbers, name="Add_Numbers", description="Add two numbers."),
|
103 |
+
Tool.from_function(subtract_numbers, name="Subtract_Numbers", description="Subtract two numbers."),
|
104 |
+
Tool.from_function(multiply_numbers, name="Multiply_Numbers", description="Multiply two numbers."),
|
105 |
+
Tool.from_function(divide_numbers, name="Divide_Numbers", description="Divide two numbers."),
|
106 |
Tool.from_function(power, name="Power", description="Raise one number to the power of another."),
|
107 |
Tool.from_function(modulus, name="Modulus", description="Compute the modulus (remainder) of a division."),
|
108 |
+
Tool.from_function(square_root, name="Square_Root", description="Compute the square root of a number."),
|
109 |
Tool.from_function(logarithm, name="Logarithm", description="Compute the logarithm of a number with a given base."),
|
110 |
web_search_tool,
|
111 |
wikipedia_tool,
|
112 |
arxiv_tool,
|
113 |
+
Tool.from_function(transcribe_audio, name="Transcribe_Audio", description="Transcribe audio to text."),
|
114 |
+
Tool.from_function(get_youtube_transcript, name="YouTube_Transcript", description="Extract transcript from YouTube."),
|
115 |
+
Tool.from_function(extract_text_from_image, name="Image_OCR", description="Extract text from an image."),
|
116 |
+
Tool.from_function(execute_python_code, name="Python_Code_Executor", description="Run Python code."),
|
117 |
+
Tool.from_function(total_sales_from_excel, name="Excel_Sales_Parser", description="Parse Excel file for total food sales."),
|
118 |
]
|
119 |
|
120 |
## ----- SYSTEM PROMPT ----- ##
|