cjb97 commited on
Commit
b17c6bc
·
1 Parent(s): f46411c

Add required output_type attribute to all Tool classes for smolagents 1.9.2 compatibility

Browse files
Files changed (3) hide show
  1. tools/final_answer.py +1 -0
  2. tools/search.py +1 -0
  3. tools/weather.py +1 -0
tools/final_answer.py CHANGED
@@ -6,6 +6,7 @@ class FinalAnswerTool(Tool):
6
 
7
  name = "final_answer"
8
  description = "Use this tool to provide your final answer to the user's question."
 
9
  inputs = {
10
  "answer": {
11
  "type": "string",
 
6
 
7
  name = "final_answer"
8
  description = "Use this tool to provide your final answer to the user's question."
9
+ output_type = "string"
10
  inputs = {
11
  "answer": {
12
  "type": "string",
tools/search.py CHANGED
@@ -8,6 +8,7 @@ class DuckDuckGoSearchTool(Tool):
8
 
9
  name = "duck_duck_go_search"
10
  description = "Search the web for information using DuckDuckGo."
 
11
  inputs = {
12
  "query": {
13
  "type": "string",
 
8
 
9
  name = "duck_duck_go_search"
10
  description = "Search the web for information using DuckDuckGo."
11
+ output_type = "string"
12
  inputs = {
13
  "query": {
14
  "type": "string",
tools/weather.py CHANGED
@@ -7,6 +7,7 @@ class WeatherTool(Tool):
7
 
8
  name = "get_weather"
9
  description = "Get the current weather for a specified location."
 
10
  inputs = {
11
  "location": {
12
  "type": "string",
 
7
 
8
  name = "get_weather"
9
  description = "Get the current weather for a specified location."
10
+ output_type = "string"
11
  inputs = {
12
  "location": {
13
  "type": "string",