mirror of
https://github.com/AstrBotDevs/AstrBot.git
synced 2026-10-24 01:39:17 +08:00
feat: 支持在命令行操作bot
fix: 修复 windows 下 ctrl+c 不能退出程序的问题
This commit is contained in:
@@ -126,8 +126,6 @@ class Command:
|
||||
fail_rec = ""
|
||||
if plugins is None:
|
||||
return False, "未找到任何插件模块"
|
||||
|
||||
print(plugins)
|
||||
|
||||
for plugin in plugins:
|
||||
try:
|
||||
|
||||
@@ -35,7 +35,7 @@ class ProviderOpenAIOfficial(Provider):
|
||||
self.api_base = None
|
||||
if 'api_base' in cfg and cfg['api_base'] != 'none' and cfg['api_base'] != '':
|
||||
self.api_base = cfg['api_base']
|
||||
print(f"设置 api_base 为: {self.api_base}")
|
||||
gu.log(f"设置 api_base 为: {self.api_base}")
|
||||
# openai client
|
||||
self.client = OpenAI(
|
||||
api_key=self.key_list[0],
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
from model.provider.provider import Provider
|
||||
# from EdgeGPT import Chatbot, ConversationStyle
|
||||
from EdgeGPT import Chatbot, ConversationStyle
|
||||
import json
|
||||
import os
|
||||
from util import general_utils as gu
|
||||
from util.cmd_config import CmdConfig as cc
|
||||
import time
|
||||
from EdgeGPT.EdgeUtils import Query, Cookie
|
||||
from EdgeGPT.EdgeGPT import Chatbot as EdgeChatbot, ConversationStyle, NotAllowedToAccess
|
||||
|
||||
class ProviderRevEdgeGPT(Provider):
|
||||
def __init__(self):
|
||||
raise Exception("Bing 逆向已停止维护,不可用,请使用 ChatGPT 官方 API。")
|
||||
|
||||
self.busy = False
|
||||
self.wait_stack = []
|
||||
with open('./cookies.json', 'r') as f:
|
||||
|
||||
Reference in New Issue
Block a user