Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,7 +20,7 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
|
|
| 20 |
|
| 21 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 22 |
@tool
|
| 23 |
-
def get_search_from_DuckDuckGo(
|
| 24 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
| 25 |
"""A tool that does nothing yet
|
| 26 |
Args:
|
|
@@ -29,7 +29,7 @@ def get_search_from_DuckDuckGo(question: str)-> str: #it's import to specify the
|
|
| 29 |
try:
|
| 30 |
search = DuckDuckGoSearchRun()
|
| 31 |
|
| 32 |
-
result = search.invoke(
|
| 33 |
return f"the answer to your question is: \n {result}"
|
| 34 |
except Exception as e:
|
| 35 |
return f"Error {str(e)}"
|
|
|
|
| 20 |
|
| 21 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 22 |
@tool
|
| 23 |
+
def get_search_from_DuckDuckGo(arg1: str)-> str: #it's import to specify the return type
|
| 24 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
| 25 |
"""A tool that does nothing yet
|
| 26 |
Args:
|
|
|
|
| 29 |
try:
|
| 30 |
search = DuckDuckGoSearchRun()
|
| 31 |
|
| 32 |
+
result = search.invoke(arg1)
|
| 33 |
return f"the answer to your question is: \n {result}"
|
| 34 |
except Exception as e:
|
| 35 |
return f"Error {str(e)}"
|