From 45dd47d6a2018f2ce3a4c8df4f001fd5f7b7a0f7 Mon Sep 17 00:00:00 2001 From: thsrite Date: Fri, 11 Aug 2023 14:35:59 +0800 Subject: [PATCH] fix chatgpt api_url --- app/plugins/chatgpt/openai.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/plugins/chatgpt/openai.py b/app/plugins/chatgpt/openai.py index e2fd4620..ac8ac404 100644 --- a/app/plugins/chatgpt/openai.py +++ b/app/plugins/chatgpt/openai.py @@ -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