From 38c901a1c555ca1d3f8e8faac76445995bd395bb Mon Sep 17 00:00:00 2001 From: lanvent Date: Sun, 26 Mar 2023 21:49:07 +0800 Subject: [PATCH] fix: init image api for bot --- bot/chatgpt/chat_gpt_bot.py | 1 + bot/openai/open_ai_bot.py | 1 + 2 files changed, 2 insertions(+) diff --git a/bot/chatgpt/chat_gpt_bot.py b/bot/chatgpt/chat_gpt_bot.py index d4523cd..07e583a 100644 --- a/bot/chatgpt/chat_gpt_bot.py +++ b/bot/chatgpt/chat_gpt_bot.py @@ -16,6 +16,7 @@ import time # OpenAI对话模型API (可用) class ChatGPTBot(Bot,OpenAIImage): def __init__(self): + super().__init__() openai.api_key = conf().get('open_ai_api_key') if conf().get('open_ai_api_base'): openai.api_base = conf().get('open_ai_api_base') diff --git a/bot/openai/open_ai_bot.py b/bot/openai/open_ai_bot.py index 553b20a..9e7ca4e 100644 --- a/bot/openai/open_ai_bot.py +++ b/bot/openai/open_ai_bot.py @@ -14,6 +14,7 @@ user_session = dict() # OpenAI对话模型API (可用) class OpenAIBot(Bot, OpenAIImage): def __init__(self): + super().__init__() openai.api_key = conf().get('open_ai_api_key') if conf().get('open_ai_api_base'): openai.api_base = conf().get('open_ai_api_base')