ソースを参照

fix: init image api for bot

master
lanvent 2年前
コミット
38c901a1c5
2個のファイルの変更2行の追加0行の削除
  1. +1
    -0
      bot/chatgpt/chat_gpt_bot.py
  2. +1
    -0
      bot/openai/open_ai_bot.py

+ 1
- 0
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')


+ 1
- 0
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')


読み込み中…
キャンセル
保存