mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-07-21 14:17:11 +08:00
fix: init image api for bot
This commit is contained in:
@@ -16,6 +16,7 @@ import time
|
|||||||
# OpenAI对话模型API (可用)
|
# OpenAI对话模型API (可用)
|
||||||
class ChatGPTBot(Bot,OpenAIImage):
|
class ChatGPTBot(Bot,OpenAIImage):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
super().__init__()
|
||||||
openai.api_key = conf().get('open_ai_api_key')
|
openai.api_key = conf().get('open_ai_api_key')
|
||||||
if conf().get('open_ai_api_base'):
|
if conf().get('open_ai_api_base'):
|
||||||
openai.api_base = conf().get('open_ai_api_base')
|
openai.api_base = conf().get('open_ai_api_base')
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ user_session = dict()
|
|||||||
# OpenAI对话模型API (可用)
|
# OpenAI对话模型API (可用)
|
||||||
class OpenAIBot(Bot, OpenAIImage):
|
class OpenAIBot(Bot, OpenAIImage):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
super().__init__()
|
||||||
openai.api_key = conf().get('open_ai_api_key')
|
openai.api_key = conf().get('open_ai_api_key')
|
||||||
if conf().get('open_ai_api_base'):
|
if conf().get('open_ai_api_base'):
|
||||||
openai.api_base = conf().get('open_ai_api_base')
|
openai.api_base = conf().get('open_ai_api_base')
|
||||||
|
|||||||
Reference in New Issue
Block a user