Skip to content

Conversation

hammadii123
Copy link

Changes Made

This PR makes the example code in openai-agents more robust, safe, and production-friendly by fixing several issues:

  1. Renamed tool argument max to avoid shadowing Python built-in.
  2. Added input validation to multiply_by_two() tool.

Why These Changes?

  • Using max as a variable name can cause confusion or bugs.
  • Tool functions should validate input and fail early if types are wrong.

This improves reliability and developer experience for anyone building with openai-agents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant