You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the OpenAI Agents SDK, the Agent class has a name parameter with type str. However, if I pass a non-string value like an integer or a list, the code still runs without any error:
fromagentsimportAgent, Runneragent=Agent(name=123, instructions="You are a helpful assistant")
result=Runner.run_sync(agent, "Write a haiku about recursion in programming.")
print(result.final_output)
Why is this possible? Shouldn't the SDK enforce that name must be a string at runtime?