openai/openai-agents-python

Agent class issue.

Closed this issue · 3 comments

I found issue on Agent class . In ur documentation u mentioned that agent class name type should be string but there is also number allow on Agent class name. so why u mentioned name type string.

It doesn't accepts number now, it raises this error if you try to give a number as Agent's name.

raise TypeError(f"Agent name must be a string, got {type(self.name).name}")
TypeError: Agent name must be a string, got int

No I try it again but still my agent is working after i assign name=123.

Please upgrade to the latest version. Newer versions should have runtime validation when you pass non-str value for the property.