Spaces:
Sleeping
Sleeping
fixed next variable name
Browse files
tools.py
CHANGED
|
@@ -151,7 +151,7 @@ class DescribeImageTool(Tool):
|
|
| 151 |
"""ensure, that the super class is instantiated properly and creat an OpenAI client (if not already done)."""
|
| 152 |
super().__init__()
|
| 153 |
|
| 154 |
-
if not self.__class__.
|
| 155 |
openai_api_key = os.environ.get('REAL_OPENAI_API_KEY', # just in case we run with other openAI compatibel providers
|
| 156 |
os.environ.get('OPENAI_API_KEY')
|
| 157 |
)
|
|
|
|
| 151 |
"""ensure, that the super class is instantiated properly and creat an OpenAI client (if not already done)."""
|
| 152 |
super().__init__()
|
| 153 |
|
| 154 |
+
if not self.__class__._client:
|
| 155 |
openai_api_key = os.environ.get('REAL_OPENAI_API_KEY', # just in case we run with other openAI compatibel providers
|
| 156 |
os.environ.get('OPENAI_API_KEY')
|
| 157 |
)
|