It would be great if boolean was authorized as input to a Tool
Motivation
I am willing to use my own tools with transformers CodeAgent ; using the method tool
I have a proper function func with typing and doc-strings as required. One of the input of the function is a bool.
When I try to run tool(func) I get: Exception: Input 'perte_de_salaire': type 'boolean' is not an authorized value, should be one of ['string', 'integer', 'number', 'image', 'audio', 'any'].
The Exception is rather clear, but why wouldn't a type as basic as boolean not be allowed? Especially since any is authorized. This is clearly a limitation to using the library.
Feature request
It would be great if
boolean
was authorized as input to aTool
Motivation
I am willing to use my own tools with transformers CodeAgent ; using the method
tool
I have a proper functionfunc
with typing and doc-strings as required. One of the input of the function is abool
. When I try to runtool(func)
I get:Exception: Input 'perte_de_salaire': type 'boolean' is not an authorized value, should be one of ['string', 'integer', 'number', 'image', 'audio', 'any']
.The Exception is rather clear, but why wouldn't a type as basic as
boolean
not be allowed? Especially since any is authorized. This is clearly a limitation to using the library.Your contribution
I seems like a few lines of code to change in tools.py (https://github.com/huggingface/transformers/blob/main/src/transformers/agents/tools.py)