cosmos01 / aichat-chatgpt Goto Github PK
View Code? Open in Web Editor NEWHoshinoBot aichat插件魔改GPT-3.5 API版本
License: Apache License 2.0
HoshinoBot aichat插件魔改GPT-3.5 API版本
License: Apache License 2.0
This model's maximum context length is 4097 tokens. However, you requested 4145 tokens (3145 in the messages, 1000 in the completion). Please reduce the length of the messages or completion.
hoshino/tool.py", line 27, in not_conflict
service_funcs.extend(t.find_handler(event))
TypeError: 'ServiceFunc' object is not iterable
这个是闲聊插件与hoshino版本不匹配吗
目前开启上下文后,重置人格会清除json中的上下文,但下一次问答后仍会写入json
如题,openai的GPT4.0的apikey可以用吗
我用nginx反代了openai api的域名,那么这个proxy我是要填"https://域名:端口"还是"https://域名:端口/v1/chat/completions"
这个proxy参数支持这样的处理吗?
多名使用者同时使用时会出现错误,建议正在进行对话时对另外使用者添加阻塞或者不给予回答
File "aichat.py", line 8
from hoshino.modules.aichat-chatGPT import Config
^
SyntaxError: invalid syntax
我希望每个回复尽可能简短简洁,避免三段论格式化,但是max_tokens设置小了,截断位置语句不完整,是否有其他办法呢
[2022-12-11 11:56:30,985 人工智障] INFO: Message 1495289549 triggered init_neko.
/root/HoshinoBot/hoshino/modules/aichat-chatGPT/aichat.py:63: RuntimeWarning: coroutine 'AsyncChatbot.get_chat_response' was never awaited
return f"发生错误: {str(e)}"
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
后台显示如上,QQ回复如标题。
读取 init_msg 文件错误,gbk 无法解码
猫娘初始化 命令出现错误, 试着复制了别的咒语,也一样会错误。
好像是识别不了中文?
[2022-12-14 16:11:45,256 人工智障] INFO: Message 335966059 triggered init_neko by PrefixTrigger.
[2022-12-14 16:11:45,268 人工智障] ERROR: <class 'UnicodeDecodeError'> occured when init_neko handling message 335966059.
[2022-12-14 16:11:45,278 人工智障] ERROR: 'gbk' codec can't decode byte 0x80 in position 14: illegal multibyte sequence
Traceback (most recent call last):
File "D:\XCW\hoshino_xcw\XCW\Hoshino\hoshino\msghandler.py", line 28, in handle_message
await service_func.func(bot, event)
File "D:\XCW\hoshino_xcw\XCW\Hoshino\hoshino\service.py", line 216, in wrapper
return await func(bot, event)
File "D:\XCW\hoshino_xcw\XCW\Hoshino\hoshino\modules\aichat-chatGPT\aichat.py", line 59, in init_neko
neko = init_msg.read()
UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 14: illegal multibyte sequence
New Thread 已经变成 New Chat了,我还以为是我pychatgpt出了问题,后来读代码才发现原来你没用他的代码。
网页改了
猫娘初始化 和 初始化人工智障 命令失效了
[2022-12-25 13:12:54,185 人工智障] INFO: Message 1545825345 triggered init_neko by PrefixTrigger.
Message: no such element: Unable to locate element: {"method":"link text","selector":"New Chat"}
(Session info: chrome=108.0.5359.125)
Stacktrace:
Backtrace:
(No symbol) [0x010FF243]
(No symbol) [0x01087FD1]
(No symbol) [0x00F7D04D]
(No symbol) [0x00FAC0B0]
(No symbol) [0x00FAC22B]
(No symbol) [0x00FDE612]
(No symbol) [0x00FC85D4]
(No symbol) [0x00FDC9EB]
(No symbol) [0x00FC8386]
(No symbol) [0x00FA163C]
(No symbol) [0x00FA269D]
GetHandleVerifier [0x01399A22+2655074]
GetHandleVerifier [0x0138CA24+2601828]
GetHandleVerifier [0x011A8C0A+619850]
GetHandleVerifier [0x011A7830+614768]
(No symbol) [0x010905FC]
(No symbol) [0x01095968]
(No symbol) [0x01095A55]
(No symbol) [0x010A051B]
BaseThreadInitThunk [0x751AFA29+25]
RtlGetAppContainerNamedObjectPath [0x77347A9E+286]
RtlGetAppContainerNamedObjectPath [0x77347A6E+238]
[2023-03-28 11:37:10,686 nonebot] ERROR: Failed to import "hoshino.modules.aichat-chatGPT.client", error: module 'openai' has no attribute 'ChatCompletion'
[2023-03-28 11:37:10,686 nonebot] ERROR: module 'openai' has no attribute 'ChatCompletion'
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/nonebot/plugin.py", line 253, in load_plugin
module = importlib.import_module(module_path)
File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 848, in exec_module
File "", line 219, in _call_with_frames_removed
File "/root/HoshinoBot/hoshino/modules/aichat-chatGPT/client.py", line 6, in
class Client:
File "/root/HoshinoBot/hoshino/modules/aichat-chatGPT/client.py", line 7, in Client
chat = openai.ChatCompletion()
AttributeError: module 'openai' has no attribute 'ChatCompletion'
根据查询,说是较新版本的openai没有这个,应将 ChatCompletion改为 Completion
希望添加azure openai参数,有几个参数和openai的都不一样
ERROR: Failed to import "hoshino.modules.aichat-chatGPT.aichat", error: No module named 'hoshino.modules.aichat',不能打开文件
明明是新生成的api
发送消息就回复这个,控制台没报错,刚弄的openai新号
看openai的Usage是已经产生计费了
是openai账号的问题吗?
机器人后台面板报错:name 'api' is not defined,开启机器人加载openai页面弹出后很短时间后就关闭。
[2022-12-12 12:37:41,529 nonebot] ERROR: Failed to import "hoshino.modules.aichat-chatGPT.aichat", error: Wrong response code
[2022-12-12 12:37:41,530 nonebot] ERROR: Wrong response code
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/nonebot/plugin.py", line 253, in load_plugin
module = importlib.import_module(module_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/root/xcwbot/HoshinoBot/hoshino/modules/aichat-chatGPT/aichat.py", line 34, in <module>
chatbot = Chatbot(auth_config)
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/revChatGPT/revChatGPT.py", line 96, in __init__
self.refresh_session()
File "/usr/local/lib/python3.11/site-packages/revChatGPT/revChatGPT.py", line 308, in refresh_session
raise Exception("Wrong response code")
Exception: Wrong response code
测试过的revChatGPT版本:0.0.38.7(网站加了cf保护)、0.0.38.8(目前最新)
按照此方法获取了参数。
不知道这个错误是不是验证失败导致的呢?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.