Lee-W commented on code in PR #36014:
URL: https://github.com/apache/airflow/pull/36014#discussion_r1413027499
##########
airflow/providers/openai/hooks/openai.py:
##########
@@ -41,13 +42,9 @@ class OpenAIHook(BaseHook):
def __init__(self, conn_id: str = default_conn_name, *args: Any, **kwargs:
Any) -> None:
super().__init__(*args, **kwargs)
self.conn_id = conn_id
- openai.api_key = self._get_api_key()
- api_base = self._get_api_base()
- if api_base:
- openai.api_base = api_base
- @staticmethod
- def get_ui_field_behaviour() -> dict[str, Any]:
+ @classmethod
Review Comment:
If that's the case, should we unify this behavior elsewhere as well? Looks
like this method is more frequently defined as staticmethod in child classes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]