Skip to content

Conversation

MuhammadHamidRaza
Copy link
Contributor

This PR improves an existing documentation example by making it more type-safe.

The change replaces the generic Any type with TContext for the RunContextWrapper in the custom_tool_handler function. This provides a more accurate and robust example for developers, demonstrating a best practice for using the library's context system.

The improved example highlights:

  • Proper use of the generic TContext type.
  • Enhanced code clarity and type safety.
  • A strong reference for other developers to follow when implementing custom tool handlers.

@seratch seratch added the documentation Improvements or additions to documentation label Aug 3, 2025
@seratch
Copy link
Member

seratch commented Aug 3, 2025

Thanks for sending this, but TContext is an abtract type representation. So, this change is not relevant for the example code.

@seratch seratch closed this Aug 3, 2025
chatgpt-codex-connector[bot]

This comment was marked as off-topic.

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

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants