We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab66578 commit ce488aaCopy full SHA for ce488aa
src/agents/tracing/processors.py
@@ -69,9 +69,12 @@ def set_api_key(self, api_key: str):
69
api_key: The OpenAI API key to use. This is the same key used by the OpenAI Python
70
client.
71
"""
72
- # We're specifically setting the underlying cached property as well
+ # Clear the cached property if it exists
73
+ if 'api_key' in self.__dict__:
74
+ del self.__dict__['api_key']
75
+
76
+ # Update the private attribute
77
self._api_key = api_key
- self.api_key = api_key
78
79
@cached_property
80
def api_key(self):
0 commit comments