Update agent.py
Browse files
agent.py
CHANGED
|
@@ -33,7 +33,7 @@ class GaiaAgent:
|
|
| 33 |
)
|
| 34 |
|
| 35 |
# Definizione dei tools necessari
|
| 36 |
-
@tool
|
| 37 |
def search_wikipedia(query: str) -> str:
|
| 38 |
"""
|
| 39 |
Cerca informazioni su Wikipedia.
|
|
@@ -50,7 +50,7 @@ class GaiaAgent:
|
|
| 50 |
except Exception as e:
|
| 51 |
return f"Errore nella ricerca su Wikipedia: {str(e)}"
|
| 52 |
|
| 53 |
-
@tool
|
| 54 |
def search_web(query: str) -> str:
|
| 55 |
"""
|
| 56 |
Cerca informazioni sul web usando DuckDuckGo.
|
|
@@ -69,7 +69,7 @@ class GaiaAgent:
|
|
| 69 |
except Exception as e:
|
| 70 |
return f"Errore nella ricerca web: {str(e)}"
|
| 71 |
|
| 72 |
-
@tool
|
| 73 |
def search_arxiv(query: str) -> str:
|
| 74 |
"""
|
| 75 |
Cerca articoli scientifici su arXiv.
|
|
@@ -94,7 +94,7 @@ class GaiaAgent:
|
|
| 94 |
except Exception as e:
|
| 95 |
return f"Errore nella ricerca su arXiv: {str(e)}"
|
| 96 |
|
| 97 |
-
@tool
|
| 98 |
def execute_code(code: str) -> str:
|
| 99 |
"""
|
| 100 |
Esegue codice Python.
|
|
|
|
| 33 |
)
|
| 34 |
|
| 35 |
# Definizione dei tools necessari
|
| 36 |
+
@tool
|
| 37 |
def search_wikipedia(query: str) -> str:
|
| 38 |
"""
|
| 39 |
Cerca informazioni su Wikipedia.
|
|
|
|
| 50 |
except Exception as e:
|
| 51 |
return f"Errore nella ricerca su Wikipedia: {str(e)}"
|
| 52 |
|
| 53 |
+
@tool
|
| 54 |
def search_web(query: str) -> str:
|
| 55 |
"""
|
| 56 |
Cerca informazioni sul web usando DuckDuckGo.
|
|
|
|
| 69 |
except Exception as e:
|
| 70 |
return f"Errore nella ricerca web: {str(e)}"
|
| 71 |
|
| 72 |
+
@tool
|
| 73 |
def search_arxiv(query: str) -> str:
|
| 74 |
"""
|
| 75 |
Cerca articoli scientifici su arXiv.
|
|
|
|
| 94 |
except Exception as e:
|
| 95 |
return f"Errore nella ricerca su arXiv: {str(e)}"
|
| 96 |
|
| 97 |
+
@tool
|
| 98 |
def execute_code(code: str) -> str:
|
| 99 |
"""
|
| 100 |
Esegue codice Python.
|