fix chatgpt api_url

This commit is contained in:
thsrite
2023-08-11 14:35:59 +08:00
parent ad9a01f3a7
commit 45dd47d6a2

View File

@ -15,6 +15,7 @@ class OpenAi:
def __init__(self, api_key: str = None, api_url: str = None):
self._api_key = api_key
self._api_url = api_url
openai.api_base = self._api_url + "/v1"
def get_state(self) -> bool:
return True if self._api_key else False