Skip to content

Commit

Permalink
Don't convert floats or ints to str
Browse files Browse the repository at this point in the history
  • Loading branch information
aymeric-roucher committed Jul 2, 2024
1 parent 87739cd commit b12c3c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/agents/agent_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def to_string(self):


AGENT_TYPE_MAPPING = {"text": AgentText, "image": AgentImage, "audio": AgentAudio}
INSTANCE_TYPE_MAPPING = {str: AgentText, float: AgentText, int: AgentText, Tensor: AgentAudio, ImageType: AgentImage}
INSTANCE_TYPE_MAPPING = {str: AgentText, Tensor: AgentAudio, ImageType: AgentImage}


def handle_agent_inputs(*args, **kwargs):
Expand Down

0 comments on commit b12c3c9

Please sign in to comment.