Skip to content

Conversation

SheikhMuhammadHamza-HS
Copy link
Contributor

@SheikhMuhammadHamza-HS SheikhMuhammadHamza-HS commented Sep 19, 2025

Title: Refactor CustomContext to use dataclass and simplify main function

Description:
This PR refactors the code to make it more concise and Pythonic:

  • Replaced CustomContext class with @dataclass to reduce boilerplate and improve maintainability.
  • Simplified main function by removing the intermediate choice variable for cleaner code.

No functional changes; the behavior remains the same. Tested with all styles (haiku, pirate, robot).

@seratch seratch changed the title - Replace CustomerContext to dataclass, - simplified main function by removing intermediate choice variable. Update dynamic_system_prompt.py to use dataclass for simiplicity Sep 22, 2025
@seratch seratch changed the title Update dynamic_system_prompt.py to use dataclass for simiplicity Update dynamic_system_prompt.py example to use dataclass for simiplicity Sep 22, 2025
@seratch seratch added the documentation Improvements or additions to documentation label Sep 22, 2025
@seratch seratch enabled auto-merge (squash) September 22, 2025 06:03
@seratch seratch disabled auto-merge September 22, 2025 06:33
@seratch seratch merged commit d91e39c into openai:main Sep 22, 2025
5 checks passed
@seratch
Copy link
Member

seratch commented Sep 22, 2025

@SheikhMuhammadHamza-HS Thanks for sending this! I've helped for resolving the error this time, but please run make lint etc. before submitting future PRs!

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.

2 participants