Spaces:
Configuration error
Configuration error
oremaz
commited on
Commit
·
d1853cd
1
Parent(s):
5a7fd39
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -350,15 +350,7 @@ safe_globals = {
|
|
| 350 |
"PIL": __import__("PIL"),
|
| 351 |
"cv2": __import__("cv2"),
|
| 352 |
"skimage": __import__("skimage"),
|
| 353 |
-
|
| 354 |
-
# Network and Web
|
| 355 |
-
"requests": __import__("requests"),
|
| 356 |
-
"urllib": __import__("urllib"),
|
| 357 |
-
|
| 358 |
-
# Text Processing
|
| 359 |
-
"nltk": __import__("nltk"),
|
| 360 |
-
"spacy": __import__("spacy"),
|
| 361 |
-
|
| 362 |
# Time Series
|
| 363 |
"pytz": __import__("pytz"),
|
| 364 |
|
|
@@ -458,9 +450,11 @@ generate_code_tool = FunctionTool.from_defaults(
|
|
| 458 |
fn=generate_python_code,
|
| 459 |
name="generate_python_code_tool",
|
| 460 |
description=(
|
| 461 |
-
"Use this tool to generate executable Python code
|
| 462 |
-
"
|
| 463 |
-
"
|
|
|
|
|
|
|
| 464 |
)
|
| 465 |
)
|
| 466 |
|
|
|
|
| 350 |
"PIL": __import__("PIL"),
|
| 351 |
"cv2": __import__("cv2"),
|
| 352 |
"skimage": __import__("skimage"),
|
| 353 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 354 |
# Time Series
|
| 355 |
"pytz": __import__("pytz"),
|
| 356 |
|
|
|
|
| 450 |
fn=generate_python_code,
|
| 451 |
name="generate_python_code_tool",
|
| 452 |
description=(
|
| 453 |
+
"Use this tool to generate executable Python code ONLY for mathematical calculations and problem solving. "
|
| 454 |
+
"This tool is specifically designed for numerical computations, statistical analysis, algebraic operations, "
|
| 455 |
+
"mathematical modeling, and scientific calculations."
|
| 456 |
+
"DO NOT use this tool for document processing, text manipulation, or data parsing - use appropriate specialized tools instead."
|
| 457 |
+
"The tool returns a string containing only the Python code for mathematical operations."
|
| 458 |
)
|
| 459 |
)
|
| 460 |
|