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 6ac037f commit c9902bdCopy full SHA for c9902bd
aishell/query_clients/gpt3_client.py
@@ -11,6 +11,12 @@
11
12
class GPT3Client(QueryClient):
13
14
+ def __init__(
15
+ self,
16
+ openai_api_key: str,
17
+ ):
18
+ openai.api_key = openai_api_key
19
+
20
def query(self, prompt: str) -> str:
21
prompt = self._construct_prompt(prompt)
22
completion: Final[OpenAIResponseModel] = cast(
aishell/query_clients/official_chatgpt_client.py
@@ -13,9 +13,8 @@ class OfficialChatGPTClient(QueryClient):
def __init__(
self,
- openai_api_key: Optional[str] = None,
):
- super().__init__()
OPENAI_API_KEY: Optional[str] = os.environ.get('OPENAI_API_KEY', openai_api_key)
if OPENAI_API_KEY is None:
raise UnauthorizedAccessError('OPENAI_API_KEY should not be none')
0 commit comments