joeyhxd / aichat_chatgpt_api Goto Github PK
View Code? Open in Web Editor NEWHoshino插件,可以用chatGPT的API对话
Hoshino插件,可以用chatGPT的API对话
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\HoshinoBot2\hoshino\modules\aichat_chatGP
T_API\AIChat.py", line 65, in get_group_reply
response = self.get_full_response(self.messages + list(self.group_context))
File "C:\Users\Administrator\Desktop\HoshinoBot2\hoshino\modules\aichat_chatGP
T_API\AIChat.py", line 85, in get_full_response
response = openai.ChatCompletion.create(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-p
ackages\openai\api_resources\chat_completion.py", line 25, in create
return super().create(*args, **kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-p
ackages\openai\api_resources\abstract\engine_api_resource.py", line 153, in crea
te
response, _, api_key = requestor.request(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-p
ackages\openai\api_requestor.py", line 288, in request
result = self.request_raw(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-p
ackages\openai\api_requestor.py", line 609, in request_raw
raise error.APIConnectionError(
openai.error.APIConnectionError: Error communicating with OpenAI: HTTPSConnectio
nPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/
completions (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel
connection failed: 400 Bad Request')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\HoshinoBot2\hoshino\service.py", line 192
, in wrapper
return await func(self.bot, ctx)
File "C:\Users\Administrator\Desktop\HoshinoBot2\hoshino\tool.py", line 58, in
decorated
return await f(*args, **kwargs)
File "C:\Users\Administrator\Desktop\HoshinoBot2\hoshino\modules\aichat_chatGP
T_API\chat.py", line 237, in ai_chat
reply = await loop.run_in_executor(executor, chat.get_group_reply, msg)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\concur
rent\futures\thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "C:\Users\Administrator\Desktop\HoshinoBot2\hoshino\modules\aichat_chatGP
T_API\AIChat.py", line 74, in get_group_reply
print(e.http_body['type'])
TypeError: 'NoneType' object is not subscriptable
参考https://github.com/lss233/chatgpt-mirai-qq-bot/wiki/%F0%9F%90%B1-%E9%A2%84%E8%AE%BE%E7%B3%BB%E7%BB%9F
可以通过添加预设的txt文件来增加人格,并且可以随时切换人格
本人编写代码能力有限改不出来(
故来求助,希望可以更新这个功能
setting.py里的proxy应该怎么写?支持哪些类型?
[2023-03-18 22:03:05,896 群AI&chatGPT] ERROR: <class 'TypeError'> occured when ai_chat handling message 1228709217.
[2023-03-18 22:03:05,896 群AI&chatGPT] ERROR: 'NoneType' object is not iterable
Traceback (most recent call last):
File "D:\Users\Kino\hoshinosp\hoshino\service.py", line 191, in wrapper
return await func(self.bot, ctx)
File "D:\Users\Kino\hoshinosp\hoshino\tool.py", line 56, in decorated
if not await not_conflict(args[0], ev):
File "D:\Users\Kino\hoshinosp\hoshino\tool.py", line 27, in not_conflict
service_funcs.extend(t.find_handler(event))
TypeError: 'NoneType' object is not iterable
想问下大佬这个是反并发的问题吗,我的hoshino确实不是最新版本,因为魔改了许多所以不太想更新,有没有办法可以解决或者把反并发的功能去掉?
hoshino/tool.py", line 27, in not_conflict
service_funcs.extend(t.find_handler(event))
TypeError: 'ServiceFunc' object is not iterable
这个是闲聊插件与hoshino版本不匹配吗
使用命令“调整AI概率 10“,机器人有返回“人工智障已启用, 当前bot回复概率为10%.”
但是“当前AI概率“,还是0%
配置文件里设置默认概率,也不生效
安装依赖pip install collections 报错
ERROR: Could not find a version that satisfies the requirement collections (from versions: none)
ERROR: No matching distribution found for collections
换源也装不了呢
您好 纯小白完全不懂 三天大概加起来根据安装指南安装了十次 群内启用时一直提示找不到插件 也安装了其他插件尝试 都正常
我能看出来的 HoshinoBot内显示的 关于这个插件的启动有
INFO: Succeeded to import "hoshino.modules.aichat_chatGPT_API.AIChat"
[2023-04-18 21:22:10,471 nonebot] INFO: Succeeded to import "hoshino.modules.aichat_chatGPT_API.get_voice"
[2023-04-18 21:22:10,471 nonebot] INFO: Succeeded to import "hoshino.modules.aichat_chatGPT_API.setting"
[2023-04-18 21:22:10,471 nonebot] INFO: Succeeded to import "hoshino.modules.aichat_chatGPT_API.text2img"
失败的有
[2023-04-18 21:22:09,523 config] WARNING: Not found config of "aichat_chatGPT_API"
[2023-04-18 21:22:10,440 nonebot] ERROR: Failed to import "hoshino.modules.aichat_chatGPT_API.chat", error: No module named 'deepl'
[2023-04-18 21:22:10,440 nonebot] ERROR: No module named 'deepl'
我自己通过Notepad++打开chat.py查看 看起来好像这个很重要 但是没有在HoshinoBot启动记录里找到关于它的启动
我实在不懂编程 从网上找不到 自己也想不出原因 抱歉打扰了
gpt4-turbo的gpt-4-1106-vision-preview模型应该可以在对话时加入图片了,请求实现图片支持
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.