I'm Well404! You can call me 404 as well.
📰My blog: https://blog.well404.top or https://well2333.github.io
📫 Contact me
一个通过 OpenAI 来对b站视频进行总结的多功能 B站解析插件
License: GNU Affero General Public License v3.0
I'm Well404! You can call me 404 as well.
📰My blog: https://blog.well404.top or https://well2333.github.io
📫 Contact me
一直都是except httpx.ReadTimeout,挑了重试次数也没用
Linux
3.11.9
2.3
5.10.2
安装插件后,按ctrl+v结束程序时程序卡死无法退出,必须关闭终端,卸载插件后恢复正常
No response
(nonebot2) ling@ling-Ubuntu:~/公共的/nonebot2/lingbot2$ nb run
05-19 17:45:38 [SUCCESS] nonebot | NoneBot is initializing...
05-19 17:45:38 [INFO] nonebot | Current Env: dev
05-19 17:45:38 [DEBUG] nonebot | Loaded Config: {'driver': '~fastapi', 'host': IPv4Address('127.0.0.1'), 'port': 8080, 'log_level': 'DEBUG', 'api_timeout': 30.0, 'superusers': {**'}, 'nickname': set(), 'command_start': {''}, 'command_sep': {'.'}, 'session_expire_timeout': datetime.timedelta(seconds=120), 'environment': 'dev', 'ps_only_su': 'True', 'duel': {'nickname': '嘎哒哒'}, 'ffmpeg': '/usr/bin/ffmpeg', 'pixiv_r18': 'False', 'search_limit': 2, 'record_priority': 99, 'saucenao_api_key': 'c289aa0c8ee0d3ce65e46e5f26f7031c1c9f9284', 'search_keyword': '图搜图'}
05-19 17:45:38 [DEBUG] nonebot | Succeeded to load adapter "OneBot V11"
05-19 17:45:38 [DEBUG] nonebot | Succeeded to load adapter "Console"
05-19 17:45:38 [ERROR] nonebot | Failed to import "nonebot_plugin_picsearcher"
Traceback (most recent call last):
File "/home/ling/公共的/nonebot2/lingbot2/bot.py", line 14, in
nonebot.load_plugin('nonebot_plugin_picsearcher')
File "/home/ling/anaconda3/envs/nonebot2/lib/python3.11/site-packages/nonebot/plugin/load.py", line 40, in load_plugin
return manager.load_plugin(module_path)
File "/home/ling/anaconda3/envs/nonebot2/lib/python3.11/site-packages/nonebot/plugin/manager.py", line 167, in load_plugin
module = importlib.import_module(self._third_party_plugin_ids[name])
File "/home/ling/anaconda3/envs/nonebot2/lib/python3.11/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'nonebot_plugin_picsearcher'
05-19 17:45:38 [SUCCESS] nonebot | Succeeded to load plugin "echo" from "nonebot.plugins.echo"
05-19 17:45:38 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_simplemusic" from "lingbot2.plugins.nonebot_plugin_simplemusic"
05-19 17:45:38 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_alconna:uniseg" from "nonebot_plugin_alconna.uniseg"
05-19 17:45:38 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_alconna"
05-19 17:45:38 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_session"
05-19 17:45:38 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_userinfo"
05-19 17:45:38 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_localstore"
05-19 17:45:39 [WARNING] nonebot_plugin_memes | 表情列表解析失败,将重新生成
05-19 17:45:39 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_memes"
05-19 17:45:39 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_duel" from "lingbot2.plugins.nonebot_plugin_duel"
05-19 17:45:39 [SUCCESS] nonebot | Succeeded to load plugin "nonebot-plugin-mcpic-main" from "lingbot2.plugins.nonebot-plugin-mcpic-main"
05-19 17:45:39 [INFO] nonebot_plugin_bilichat | nonebot_plugin_bilichat 缓存文件夹 -> /home/ling/.cache/nonebot2/nonebot_plugin_bilichat
05-19 17:45:39 [INFO] nonebot_plugin_bilichat | nonebot_plugin_bilichat 数据文件夹 -> /home/ling/.local/share/nonebot2/nonebot_plugin_bilichat
05-19 17:45:39 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_htmlrender"
05-19 17:45:39 [INFO] nonebot_plugin_bilichat | bilichat_use_browser 所需依赖已安装,采用浏览器渲染模式
05-19 17:45:39 [INFO] nonebot_plugin_bilichat | bilichat_cache_serive 无法使用 MongoDB 作为缓存服务, 使用 JSON 文件作为缓存服务
05-19 17:45:39 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_apscheduler"
05-19 17:45:39 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_auto_bot_selector"
05-19 17:45:39 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_waiter"
05-19 17:45:39 [WARNING] nonebot_plugin_bilichat | sentry_sdk 未安装
05-19 17:45:39 [INFO] nonebot_plugin_bilichat | 使用 JSON 文件作为缓存服务
05-19 17:45:39 [DEBUG] nonebot_plugin_bilichat | Loading font: sarasa-mono-sc-semibold.ttf
05-19 17:45:39 [DEBUG] nonebot_plugin_bilichat | Font sarasa-mono-sc-semibold.ttf found in local
05-19 17:45:39 [DEBUG] nonebot_plugin_bilichat | Loading font: sarasa-mono-sc-bold.ttf
05-19 17:45:39 [DEBUG] nonebot_plugin_bilichat | Font sarasa-mono-sc-bold.ttf found in local
05-19 17:45:39 [DEBUG] nonebot_plugin_bilichat | Loading font: vanfont.ttf
05-19 17:45:39 [DEBUG] nonebot_plugin_bilichat | Font vanfont.ttf found in local
05-19 17:45:39 [DEBUG] nonebot_plugin_bilichat | Loading font: HarmonyOS_Sans_SC_Medium.ttf
05-19 17:45:39 [DEBUG] nonebot_plugin_bilichat | Font HarmonyOS_Sans_SC_Medium.ttf found in local
05-19 17:45:39 [DEBUG] nonebot_plugin_bilichat | Loading font: nte.ttf
05-19 17:45:39 [DEBUG] nonebot_plugin_bilichat | Font nte.ttf found in local
05-19 17:45:39 [SUCCESS] nonebot_plugin_bilichat |
*
*
*
*
*
bilichat_webui_path
in .env file. * *
05-19 17:45:39 [WARNING] nonebot | Duplicated prefix rule "关注"
05-19 17:45:39 [WARNING] nonebot | Duplicated prefix rule "关注"
05-19 17:45:39 [WARNING] nonebot | Duplicated prefix rule "订阅"
05-19 17:45:39 [WARNING] nonebot | Duplicated prefix rule "bilichat.sub"
05-19 17:45:39 [WARNING] nonebot | Duplicated prefix rule "bilichat.unsub"
05-19 17:45:39 [WARNING] nonebot | Duplicated prefix rule "退订"
05-19 17:45:39 [WARNING] nonebot | Duplicated prefix rule "取关"
05-19 17:45:39 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_bilichat"
05-19 17:45:39 [SUCCESS] nonebot | Succeeded to load plugin "YetAnotherPicSearch"
05-19 17:45:39 [SUCCESS] nonebot | Succeeded to load plugin "jock" from "lingbot2.plugins.jock"
05-19 17:45:39 [SUCCESS] nonebot | Succeeded to load plugin "chats" from "lingbot2.plugins.chats"
05-19 17:45:39 [SUCCESS] nonebot | Succeeded to load plugin "AI_voice" from "lingbot2.plugins.AI_voice"
05-19 17:45:40 [SUCCESS] nonebot | Succeeded to load plugin "weather" from "lingbot2.plugins.weather"
05-19 17:45:40 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_epicfree"
05-19 17:45:40 [DEBUG] nonebot_plugin_picstatus | Registered collector memory_stat
05-19 17:45:40 [DEBUG] nonebot_plugin_picstatus | Registered collector swap_stat
05-19 17:45:40 [DEBUG] nonebot_plugin_picstatus | Registered collector bots
05-19 17:45:40 [DEBUG] nonebot_plugin_picstatus | Registered collector process_status
05-19 17:45:40 [DEBUG] nonebot_plugin_picstatus | Registered collector disk_usage
05-19 17:45:40 [DEBUG] nonebot_plugin_picstatus | Registered collector disk_io
05-19 17:45:40 [DEBUG] nonebot_plugin_picstatus | Registered collector nonebot_run_time
05-19 17:45:40 [DEBUG] nonebot_plugin_picstatus | Registered collector system_run_time
05-19 17:45:40 [DEBUG] nonebot_plugin_picstatus | Registered collector nonebot_version
05-19 17:45:40 [DEBUG] nonebot_plugin_picstatus | Registered collector ps_version
05-19 17:45:40 [DEBUG] nonebot_plugin_picstatus | Registered collector time
05-19 17:45:40 [DEBUG] nonebot_plugin_picstatus | Registered collector python_version
05-19 17:45:40 [DEBUG] nonebot_plugin_picstatus | Registered collector system_name
05-19 17:45:40 [DEBUG] nonebot_plugin_picstatus | Registered collector cpu_brand
05-19 17:45:40 [DEBUG] nonebot_plugin_picstatus | Registered collector cpu_count_logical
05-19 17:45:40 [DEBUG] nonebot_plugin_picstatus | Registered collector cpu_count
05-19 17:45:40 [DEBUG] nonebot_plugin_picstatus | Registered collector cpu_percent
05-19 17:45:40 [DEBUG] nonebot_plugin_picstatus | Registered collector cpu_freq
05-19 17:45:40 [DEBUG] nonebot_plugin_picstatus | Registered collector network_io
05-19 17:45:40 [DEBUG] nonebot_plugin_picstatus | Registered collector network_connection
05-19 17:45:40 [DEBUG] nonebot_plugin_picstatus | Registered global jinja filter format_cpu_freq
05-19 17:45:40 [DEBUG] nonebot_plugin_picstatus | Registered global jinja filter percent_to_color
05-19 17:45:40 [DEBUG] nonebot_plugin_picstatus | Registered global jinja filter auto_convert_unit
05-19 17:45:40 [DEBUG] nonebot_plugin_picstatus | Registered global jinja filter br
05-19 17:45:40 [DEBUG] nonebot_plugin_picstatus | Loaded template default TemplateInfo(collectors={'cpu_brand', 'nonebot_run_time', 'cpu_percent', 'system_run_time', 'network_io', 'cpu_count_logical', 'memory_stat', 'nonebot_version', 'cpu_count', 'disk_io', 'swap_stat', 'system_name', 'python_version', 'ps_version', 'network_connection', 'process_status', 'time', 'bots', 'cpu_freq', 'disk_usage'}, config=TemplateConfig(ps_default_components=['header', 'cpu_mem', 'disk', 'network', 'process', 'footer'], ps_default_additional_css=[], ps_default_additional_script=[]), renderer=<function render at 0x76e8c87882c0>)
05-19 17:45:40 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_picstatus" from "lingbot2.plugins.nonebot_plugin_picstatus"
05-19 17:45:40 [SUCCESS] nonebot | Succeeded to load plugin "img" from "lingbot2.plugins.img"
05-19 17:45:40 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_pixiv" from "lingbot2.plugins.nonebot_plugin_pixiv"
05-19 17:45:40 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_alconna"
05-19 17:45:40 [SUCCESS] nonebot | Succeeded to load plugin "saylove" from "lingbot2.plugins.saylove"
05-19 17:45:40 [SUCCESS] nonebot | Running NoneBot...
05-19 17:45:40 [DEBUG] nonebot | Loaded adapters: OneBot V11, Console
05-19 17:45:40 [INFO] uvicorn | Started server process [37584]
05-19 17:45:40 [INFO] uvicorn | Waiting for application startup.
05-19 17:45:40 [INFO] nonebot_plugin_memes | 正在检查资源文件...
05-19 17:45:42 [SUCCESS] nonebot | Console unmounted.
05-19 17:45:42 [WARNING] nonebot | Press Ctrl-C for Application exit
05-19 17:45:42 [INFO] nonebot_plugin_auto_bot_selector | pop bot Bot(type='Console', self_id='console')
05-19 17:45:42 [INFO] nonebot_plugin_bilichat | 重新检查可推送的用户
05-19 17:45:42 [INFO] nonebot_plugin_bilichat | 正在刷新激活的UP列表
05-19 17:45:42 [DEBUG] nonebot_plugin_bilichat | 正在尝试激活用户 QQ Group--1149228175 订阅的 UP
05-19 17:45:42 [DEBUG] nonebot_plugin_bilichat | 用户 QQ Group--1149228175 无可用推送 Bot
05-19 17:45:42 [DEBUG] nonebot_plugin_bilichat | 正在尝试激活用户 QQ Group--317701038 订阅的 UP
05-19 17:45:42 [DEBUG] nonebot_plugin_bilichat | 用户 QQ Group--317701038 无可用推送 Bot
05-19 17:45:42 [DEBUG] nonebot_plugin_bilichat | 已激活的UP:
无已激活的UP
05-19 17:45:42 [INFO] nonebot_plugin_bilichat | 检查可推送的用户完成
^C05-19 17:45:42 [INFO] uvicorn | Shutting down
05-19 17:45:42 [INFO] uvicorn | Waiting for application shutdown.
05-19 17:45:42 [INFO] nonebot_plugin_htmlrender | Browser Stopped.
05-19 17:45:42 [INFO] nonebot_plugin_apscheduler | Scheduler Shutdown
05-19 17:45:42 [DEBUG] nonebot | Waiting for running bot connection hooks...
05-19 17:45:45 [DEBUG] meme_generator | Available resource urls: ['https://raw.githubusercontent.com/MeetWq/meme-generator/', 'https://fastly.jsdelivr.net/gh/MeetWq/meme-generator@', 'https://raw.gitmirror.com/MeetWq/meme-generator/'
]
希望指令能添加个允许群管理和群主使用的配置
bot的主人不一定在bot所在群聊,群管理和群主可以使用指令会方便点
当发送up主个人空间时会出现KeyError bili_number
bilichat版本: 1.8.0
nb端收到的日志
04-29 16:24:17 [SUCCESS] nonebot | OneBot V11 2029172546 | [message.group.normal]: Message -1136853180 from 1492164106@[群:710768309] '[[分享]联合国的个人空间]请使用最新版本手机QQ查看[json:data={"app":"com.te
ncent.structmsg","desc":"新闻","bizsrc":"","view":"news...]'
gocq收到的日志
: [[分享]联合国的个人空间]请使用最新版本手机QQ查看[CQ:json,data={"app":"com.tencent.structmsg","desc":"新闻","bizsrc":"","view":"news","ver":"0.0.0.1","prompt":"[分享]联合国的个人空间","meta":{"news":{"action":"","android_pkg_name":"","app_type":1,"appid":100951776,"ctime":1682756365,"desc":"你感兴趣的视频都在B站","jumpUrl":"https:\/\/b23.tv\/xrbcW36?share_medium=android&share_source=qq&bbid=XX8E8208EF0786F05E19485C7F78D671AD1EB&ts=1682756360079","preview":"https:\/\/pic.ugcimg.cn\/fb4fd72800eab6723105af744f9259b6\/jpg1","source_icon":"https:\/\/open.gtimg.cn\/open\/app_icon\/00\/95\/17\/76\/100951776_100_m.png?t=1682411052","source_url":"","tag":"哔哩哔哩","title":"联合国的个人空间","uin":2801303328}},"config":{"ctime":1682756365,"forward":true,"token":"dcf97000fe48fcc9a56cd659d3010e9c","type":"normal"}}] (-1136853180)
报错信息如下
04-29 16:19:28 [ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_bilichat) failed.
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\LittlePaimon\bot.py", line 38, in <module>
nonebot.run(app="__mp_main__:app", access_log=False)
File "C:\Users\Administrator\Desktop\LittlePaimon\.venv\lib\site-packages\nonebot\__init__.py", line 309, in run
get_driver().run(*args, **kwargs)
File "C:\Users\Administrator\Desktop\LittlePaimon\.venv\lib\site-packages\nonebot\drivers\fastapi.py", line 198, in run
uvicorn.run(
File "C:\Users\Administrator\Desktop\LittlePaimon\.venv\lib\site-packages\uvicorn\main.py", line 569, in run
server.run()
File "C:\Users\Administrator\Desktop\LittlePaimon\.venv\lib\site-packages\uvicorn\server.py", line 60, in run
return asyncio.run(self.serve(sockets=sockets))
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 628, in run_until_complete
self.run_forever()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\windows_events.py", line 316, in run_forever
super().run_forever()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 595, in run_forever
self._run_once()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 1881, in _run_once
handle._run()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "C:\Users\Administrator\Desktop\LittlePaimon\.venv\lib\site-packages\nonebot\message.py", line 141, in _check_matcher
await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)
> File "C:\Users\Administrator\Desktop\LittlePaimon\.venv\lib\site-packages\nonebot\message.py", line 187, in _run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "C:\Users\Administrator\Desktop\LittlePaimon\.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line 753, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "C:\Users\Administrator\Desktop\LittlePaimon\.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line 728, in simple_run
await handler(
File "C:\Users\Administrator\Desktop\LittlePaimon\.venv\lib\site-packages\nonebot\dependencies\__init__.py", line 108, in __call__
return await cast(Callable[..., Awaitable[R]], self.call)(**values)
File "C:\Users\Administrator\Desktop\LittlePaimon\.venv\lib\site-packages\nonebot_plugin_bilichat\__init__.py", line 122, in video_info
bili_number, uid = state["bili_number"], state["_uid_"]
KeyError: 'bili_number'
Windows
3.9.7
2.1.x
5.9.2
在触发/bili指令之后触发alcUnimeg的satori keyError
alc我在其他上面用的都没有问题,satori adapter在最近更新了的Message结构,alc也进行了同步更新,我看到本插件也使用了alc,但还是出现了问题,不知道是怎么回事,望解答或修复,
看到Plugin_meta里没写可以支持satori,如果真的不支持的话那我close了(
bilichat_bilibili_cookie = "C:/bili_cookie.har"
bilichat_cache_serive = "json"
bilichat_command_to_me = False
bilichat_cmd_start = "bili"
bilichat_cd_time = 120
bilichat_neterror_retry = 3
bilichat_use_browser = Flase
bilichat_word_cloud = False
bilichat_official_summary = True
bilichat_openai_token = sk-
bilichat_openai_proxy = "https://.top/"
05-06 08:35:04 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_bilichat.base_content_parsing, lineno=160) running complete
05-06 08:35:04 [ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_bilichat.base_content_parsing, lineno=160) failed.
Traceback (most recent call last):
File "", line 17, in
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot_init_.py", line 335, in run
get_driver().run(*args, **kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\drivers\fastapi.py", line 186, in run
uvicorn.run(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\uvicorn\main.py", line 578, in run
server.run()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\uvicorn\server.py", line 61, in run
return asyncio.run(self.serve(sockets=sockets))
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 629, in run_until_complete
self.run_forever()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\windows_events.py", line 316, in run_forever
super().run_forever()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 596, in run_forever
self._run_once()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1890, in _run_once
handle._run()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\message.py", line 476, in check_and_run_matcher
await _run_matcher(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\message.py", line 428, in run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\internal\matcher\matcher.py", line 850, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\internal\matcher\matcher.py", line 825, in simple_run
await handler(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\dependencies_init.py", line 94, in call
return await cast(Callable[..., Awaitable[R]], self.call)(**values)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot_plugin_bilichat\base_content_parsing.py", line 179, in content_info
receipt = await msgs.send()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot_plugin_alconna\uniseg\message.py", line 918, in send
res = await fn.send_to(target, bot, msg)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot_plugin_alconna\uniseg\adapters\satori\exporter.py", line 170, in send_to
return await bot.send_message(target.id, message)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\adapters\satori\bot.py", line 253, in send_message
return await self.message_create(channel_id=channel_id, content=str(message))
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\internal\adapter\message.py", line 149, in str
return "".join(str(seg) for seg in self)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\internal\adapter\message.py", line 149, in
return "".join(str(seg) for seg in self)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\adapters\satori\message.py", line 428, in str
text = self.data["text"]
KeyError: 'text'
Windows
尝试过3.10和3.11
2.1.2
4.11.2
这里写的playwright为>=1.17.2
nonebot-plugin-bilichat/pdm.lock
Lines 1386 to 1395 in 8f76236
这里写的playwright为1.36.0
nonebot-plugin-bilichat/pdm.lock
Lines 1626 to 1644 in 8f76236
实际安装会装上最新版1.40.0
https://pypi.org/project/playwright/
然后就会导致
ModuleNotFoundError: No module named 'playwright._impl._api_types'
然后插件不会响应任何事件
手动回到1.36版本后正常
查询可知在playwright 1.14.0中,新的导入方式为playwright._impl._errors.Error
而不是playwright._impl._api_types.Error
希望以后能把依赖版本号写死吧,不然版本问题之后会挺头疼
No response
No response
由于一个nb可以连接多个gocq,因此可能需要区分不同bot,因此如果此字段改成dict会更方便,比如配置文件可以这么写
BOT_NAMES={"123456":"初音Bot","56789":"洛天依Bot"}
参见 lgc-NB2Dev/nonebot-plugin-multincm#3
建议:可以把这个扔到 on_startup
里,或者换用 loop.run_until_complete()
机子是国内的,打算使用代理,但是代理配置一填写就报错
要加http://
或其他什么吗
报错日志:
06-05 21:12:27 [ERROR] nonebot | Failed to import "nonebot_plugin_bilichat"
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\anyio\_core\_sockets.py", line 186, in connect_tcp
addr_obj = ip_address(remote_host)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\ipaddress.py", line 54, in ip_address
raise ValueError(f'{address!r} does not appear to be an IPv4 or IPv6 address')
ValueError: 'openaipublic.blob.core.windows.net' does not appear to be an IPv4 or IPv6 address
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpcore\backends\asyncio.py", line 111, in connect_tcp
stream: anyio.abc.ByteStream = await anyio.connect_tcp(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\anyio\_core\_sockets.py", line 189, in connect_tcp
gai_res = await getaddrinfo(
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpcore\_exceptions.py", line 10, in map_exceptions
yield
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpcore\backends\asyncio.py", line 110, in connect_tcp
with anyio.fail_after(timeout):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\anyio\_core\_tasks.py", line 118, in __exit__
raise TimeoutError
TimeoutError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpx\_transports\default.py", line 60, in map_httpcore_exceptions
yield
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpx\_transports\default.py", line 353, in handle_async_request
resp = await self._pool.handle_async_request(req)
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpcore\_async\connection_pool.py", line 253, in handle_async_request
raise exc
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpcore\_async\connection_pool.py", line 237, in handle_async_request
response = await connection.handle_async_request(request)
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpcore\_async\connection.py", line 86, in handle_async_request
raise exc
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpcore\_async\connection.py", line 63, in handle_async_request
stream = await self._connect(request)
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpcore\_async\connection.py", line 111, in _connect
stream = await self._network_backend.connect_tcp(**kwargs)
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpcore\backends\auto.py", line 29, in connect_tcp
return await self._backend.connect_tcp(
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpcore\backends\asyncio.py", line 109, in connect_tcp
with map_exceptions(exc_map):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in __exit__
self.gen.throw(typ, value, traceback)
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpcore\_exceptions.py", line 14, in map_exceptions
raise to_exc(exc)
httpcore.ConnectTimeout
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "E:\IDEAyes\BOT\nonebot2\bot.py", line 38, in <module>
nonebot.load_plugin("nonebot_plugin_bilichat")
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\nonebot\plugin\load.py", line 37, in load_plugin
return manager.load_plugin(module_path)
> File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\nonebot\plugin\manager.py", line 141, in load_plugin
module = importlib.import_module(name)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\nonebot\plugin\manager.py", line 240, in exec_module
super().exec_module(module)
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\nonebot_plugin_bilichat\__init__.py", line 49, in <module>
from .summary import summarization
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\nonebot_plugin_bilichat\summary\__init__.py", line 12, in <module>
from .openai_summarise import openai_summarization
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\nonebot_plugin_bilichat\summary\openai_summarise.py", line 10, in <module>
from .openai import get_small_size_transcripts, get_summarise_prompt, openai_req
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\nonebot_plugin_bilichat\summary\openai.py", line 15, in <module>
tiktoken_enc = asyncio.run(tiktoken_async.encoding_for_model(plugin_config.bilichat_openai_model))
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 646, in run_until_complete
return future.result()
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\tiktoken_async\model.py", line 67, in encoding_for_model
return await get_encoding(model_encoding_name)
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\tiktoken_async\registry.py", line 67, in get_encoding
enc = Encoding(**await constructor())
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\tiktoken_async_ext\openai_public.py", line 64, in cl100k_base
mergeable_ranks = await load_tiktoken_bpe(
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\tiktoken_async\load.py", line 118, in load_tiktoken_bpe
contents = await read_file_cached(tiktoken_bpe_file)
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\tiktoken_async\load.py", line 48, in read_file_cached
contents = await read_file(blobpath)
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\tiktoken_async\load.py", line 25, in read_file
resp = await client.get(blobpath)
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpx\_client.py", line 1757, in get
return await self.request(
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpx\_client.py", line 1533, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpx\_client.py", line 1620, in send
response = await self._send_handling_auth(
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpx\_client.py", line 1648, in _send_handling_auth
response = await self._send_handling_redirects(
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpx\_client.py", line 1685, in _send_handling_redirects
response = await self._send_single_request(request)
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpx\_client.py", line 1722, in _send_single_request
response = await transport.handle_async_request(request)
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpx\_transports\default.py", line 352, in handle_async_request
with map_httpcore_exceptions():
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in __exit__
self.gen.throw(typ, value, traceback)
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpx\_transports\default.py", line 77, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ConnectTimeout
虽然合并消息会被风控,但这个函数确实忘记返回了
@validator("bilichat_forword_msg")
def check_adapter_can_send_forword_msg(cls, v):
if not v:
return
drivers = get_driver()._adapters.keys()
if "OneBot V12" in drivers:
logger.warning(
"Forword_msg is not implemented by OneBot V12, events of OneBot V12 will not be sent as forword_msg!"
)
if "OneBot V11" in drivers:
logger.warning(
"Using forward_msg may cause serious risk control restrictions, please enable this feature with caution!"
)
return v # <--- 少了这个
init.py 中生成词云的逻辑在关闭词云后会报错,改成下面这样可以改正这个错误
if plugin_config.bilichat_word_cloud:
if image := await wordcloud(cache=cache, cid=str(info["cid"])):
if "wordcloud" in plugin_config.bilichat_forword_msg:
forword_list.append(V11_MS.image(image))
else:
await matcher.send(reply + V11_MS.image(image)) # type: ignore
else:
if "wordcloud" in plugin_config.bilichat_forword_msg:
forword_list.append("视频无有效字幕")
await forword_msg_v11(bot, event, forword_list)
else:
await matcher.finish(f"{reply}视频无有效字幕")
近期B站上线了“AI视频总结”的功能,入口位于B站网页版的视频页下方,点击后即可打开一个AI生成的总结页面
以下是对该入口的逻辑观察:
预测该接口的AI总结逻辑可能为调用字幕接口进行生成,且暂时没有请求限制及加密逻辑
希望能添加对该接口的调用支持
amueller/word_cloud#637
经过测试发现 wordcloud 插件最高支持到 python3.10
Windows
3.11
2.0.1
4.7.0
当视频的简介中有可以解析的B站链接时,通过手机B站的分享为卡片形式会导致正则提取错误,解析到不正确的链接
在json的desc的值为简介,正则会将里面的内容错误提取
复现视频https://www.bilibili.com/video/av959100625
No response
Linux
3.9.10
2.1
2
你好,项目中的字体组件已经无法连接,可以上传一下吗?
src: url("https://fonts.bbot/?name=vanfont.ttf");
src: url("https://fonts.bbot?name=HarmonyOS_Sans_SC_Medium.ttf");
src: url("https://fonts.bbot/?name=nte.ttf");
No response
No response
带链接的通知样式似乎会增加风控几率,可否增加纯截图版的推送样式
希望添加小程序样式的开播通知
查动态希望增加理解(如果动态为视频动态,则返回视频短链,不是视频类型则照原样返回截图)
增加通过uid订阅up主
刚发现其实这个接口是可以通过keyword=uid:{uid}来传入uid进行查询
因为通过名称sub可能会有up主名字奇奇怪怪和一些特殊符号,可以考虑只保留uid绑定(限制isdigit)或者两者都兼容
这里直接返回的是配置项的是否允许私聊,并没有对user_id进行校验
channel_id也是同上,这里进行二次校验的话,黑白名单也就不仅仅只对群生效,qq号和频道号也可以用于黑白名单
Windows
3.11
2
new
报错
关闭插件后可正常运行
# 对同一视频的响应冷却时间(防止刷屏)
bilichat_cd_time = 120
# 网络请求重试次数
bilichat_neterror_retry = 3
# 是否使用浏览器截图(需要额外依赖)
bilichat_use_browser = True
# 是否开启词云(需要额外依赖)
bilichat_word_cloud = True
# === AI 总结相关 ===
# 官方总结接口
bilichat_official_summary = True
Task exception was never retrieved
future: <Task finished name='Task-3' coro=<Connection.run() done, defined at C:\Users\admin\Desktop\nonebot\New-QQ-Bot2\.venv\Lib\site-packages\playwright\_impl\_connection.py:265> exception=NotImplementedError()>
Traceback (most recent call last):
File "C:\Users\admin\Desktop\nonebot\New-QQ-Bot2\.venv\Lib\site-packages\playwright\_impl\_connection.py", line 272, in run
await self._transport.connect()
File "C:\Users\admin\Desktop\nonebot\New-QQ-Bot2\.venv\Lib\site-packages\playwright\_impl\_transport.py", line 133, in connect
raise exc
File "C:\Users\admin\Desktop\nonebot\New-QQ-Bot2\.venv\Lib\site-packages\playwright\_impl\_transport.py", line 120, in connect
self._proc = await asyncio.create_subprocess_exec(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\asyncio\subprocess.py", line 223, in create_subprocess_exec
transport, protocol = await loop.subprocess_exec(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 1694, in subprocess_exec
transport = await self._make_subprocess_transport(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 502, in _make_subprocess_transport
raise NotImplementedError
NotImplementedError
05-19 21:52:31 [ERROR] uvicorn | Traceback (most recent call last):
File "C:\Users\admin\Desktop\nonebot\New-QQ-Bot2\.venv\Lib\site-packages\starlette\routing.py", line 732, in lifespan
async with self.lifespan_context(app) as maybe_state:
File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 204, in __aenter__
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\admin\Desktop\nonebot\New-QQ-Bot2\.venv\Lib\site-packages\nonebot\drivers\fastapi.py", line 153, in _lifespan_manager
await self._lifespan.startup()
File "C:\Users\admin\Desktop\nonebot\New-QQ-Bot2\.venv\Lib\site-packages\nonebot\internal\driver\_lifespan.py", line 42, in startup
await self._run_lifespan_func(self._startup_funcs)
File "C:\Users\admin\Desktop\nonebot\New-QQ-Bot2\.venv\Lib\site-packages\nonebot\internal\driver\_lifespan.py", line 36, in _run_lifespan_func
await cast(ASYNC_LIFESPAN_FUNC, func)()
File "C:\Users\admin\Desktop\nonebot\New-QQ-Bot2\.venv\Lib\site-packages\nonebot_plugin_htmlrender\__init__.py", line 38, in init
browser = await get_browser(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\admin\Desktop\nonebot\New-QQ-Bot2\.venv\Lib\site-packages\nonebot_plugin_htmlrender\browser.py", line 61, in get_browser
return _browser if _browser and _browser.is_connected() else await init(**kwargs)
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\admin\Desktop\nonebot\New-QQ-Bot2\.venv\Lib\site-packages\nonebot_plugin_htmlrender\browser.py", line 32, in init
_playwright = await async_playwright().start()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\admin\Desktop\nonebot\New-QQ-Bot2\.venv\Lib\site-packages\playwright\async_api\_context_manager.py", line 51, in start
return await self.__aenter__()
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\admin\Desktop\nonebot\New-QQ-Bot2\.venv\Lib\site-packages\playwright\async_api\_context_manager.py", line 46, in __aenter__
playwright = AsyncPlaywright(next(iter(done)).result())
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\admin\Desktop\nonebot\New-QQ-Bot2\.venv\Lib\site-packages\playwright\_impl\_transport.py", line 120, in connect
self._proc = await asyncio.create_subprocess_exec(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\asyncio\subprocess.py", line 223, in create_subprocess_exec
transport, protocol = await loop.subprocess_exec(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 1694, in subprocess_exec
transport = await self._make_subprocess_transport(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 502, in _make_subprocess_transport
raise NotImplementedError
NotImplementedError
05-19 21:52:31 [ERROR] uvicorn | Application startup failed. Exiting.
考虑到国内服务器挂代理有可能会出事,所以自己搭了一个openai api的镜像,可在国内访问的那种,希望插件能支持这样用
设置 openai.api_base
就可以实现
请问这个应该如何解决?
04-22 20:30:57 [ERROR] nonebot_plugin_bilichat | Video(Column) av441997088 summary failed: received 1000 (OK); then sent 1000 (OK)
Traceback (most recent call last):
File "<string>", line 21, in <module>
File "D:\code\bot\nonebot\Hao_Tian_Bot\.venv\lib\site-packages\nonebot\__init__.py", line 309, in run
get_driver().run(*args, **kwargs)
File "D:\code\bot\nonebot\Hao_Tian_Bot\.venv\lib\site-packages\nonebot\drivers\fastapi.py", line 198, in run
uvicorn.run(
File "D:\code\bot\nonebot\Hao_Tian_Bot\.venv\lib\site-packages\uvicorn\main.py", line 568, in run
server.run()
File "D:\code\bot\nonebot\Hao_Tian_Bot\.venv\lib\site-packages\uvicorn\server.py", line 59, in run
return asyncio.run(self.serve(sockets=sockets))
File "D:\Program Files\Python310\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "D:\Program Files\Python310\lib\asyncio\base_events.py", line 633, in run_until_complete
self.run_forever()
File "D:\Program Files\Python310\lib\asyncio\windows_events.py", line 321, in run_forever
super().run_forever()
File "D:\Program Files\Python310\lib\asyncio\base_events.py", line 600, in run_forever
self._run_once()
File "D:\Program Files\Python310\lib\asyncio\base_events.py", line 1896, in _run_once
handle._run()
File "D:\Program Files\Python310\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "D:\code\bot\nonebot\Hao_Tian_Bot\.venv\lib\site-packages\nonebot\message.py", line 141, in _check_matcher
await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)
File "D:\code\bot\nonebot\Hao_Tian_Bot\.venv\lib\site-packages\nonebot\message.py", line 187, in _run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "D:\code\bot\nonebot\Hao_Tian_Bot\.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line 753, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "D:\code\bot\nonebot\Hao_Tian_Bot\.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line 728, in simple_run
await handler(
File "D:\code\bot\nonebot\Hao_Tian_Bot\.venv\lib\site-packages\nonebot\dependencies\__init__.py", line 108, in __call__
return await cast(Callable[..., Awaitable[R]], self.call)(**values)
File "D:\code\bot\nonebot\Hao_Tian_Bot\.venv\lib\site-packages\nonebot_plugin_bilichat\__init__.py", line 140, in video_info_v11
if summary := await summarization(cache=cache, cid=str(info["cid"])):
File "D:\code\bot\nonebot\Hao_Tian_Bot\.venv\lib\site-packages\nonebot_plugin_bilichat\summary\__init__.py", line 21, in summarization
summary, newbing_meaning = await newbing_summarization(cache, cid)
> File "D:\code\bot\nonebot\Hao_Tian_Bot\.venv\lib\site-packages\nonebot_plugin_bilichat\summary\newbing_summarise.py", line 96, in newbing_summarization
ai_summary = await newbing_req(get_small_size_transcripts(cache.title, cache.episodes[cid].content))
File "D:\code\bot\nonebot\Hao_Tian_Bot\.venv\lib\site-packages\nonebot_plugin_bilichat\summary\newbing_summarise.py", line 76, in newbing_req
ans = await bot.ask(
File "D:\code\bot\nonebot\Hao_Tian_Bot\.venv\lib\site-packages\EdgeGPT.py", line 376, in ask
async for final, response in self.chat_hub.ask_stream(
File "D:\code\bot\nonebot\Hao_Tian_Bot\.venv\lib\site-packages\EdgeGPT.py", line 310, in ask_stream
objects = str(await self.wss.recv()).split(DELIMITER)
File "D:\code\bot\nonebot\Hao_Tian_Bot\.venv\lib\site-packages\websockets\legacy\protocol.py", line 568, in recv
await self.ensure_open()
File "D:\code\bot\nonebot\Hao_Tian_Bot\.venv\lib\site-packages\websockets\legacy\protocol.py", line 944, in ensure_open
raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedOK: received 1000 (OK); then sent 1000 (OK)
另外我没太理解那个cookies到底要放在哪里,因此每个子目录应该都放了一个,配置里面也写了http代理
全部发出来容易刷屏,合并消息比较美观好看
Windows
3.12.2
2.2.0
5.1.3
skia-python不支持python312导致python312环境上无法安装依赖
No response
No response
B站号临时冻结
只登录一个B站号的情况下,关注过多,或多人开播会出现B站账号临时冻结的情况,希望添加多个B站账号进行轮询
在 bilichat 的 v5 版本中计划添加 WebUI 以实现更加直观、便捷、简易的使用体验。
但由于个人技术不足,很难独自完成WebUI的前端部分开发。因此,我在此恳请社区的开发者们加入这一努力,帮助我们完成这个重要的里程碑。
如果你对前端开发有经验,或者对该项目感兴趣并愿意贡献一己之力,请不要犹豫,你的帮助将对项目产生深远的影响。
目前,WebUI需要包含三个主要页面:
主页应当对插件的各个子功能进行有效的引导,提供直观的用户界面。
如果设计允许,也可将其他子功能直接整合到主页中。
此部分已有通过 ChatGPT4 编写的初步实现,已经可以投入使用,可以进一步的优化。
此页面提供了直接将 bilibili 的 Cookies 直接上传至服务器的功能,也可以生成一个油猴脚本,在用户访问 bilibili 时自动将 cookies 上传至服务器
这个页面的目的是为了让用户能够直观地管理每个用户(包括群组和频道)的订阅信息,以及订阅部分的整体配置信息。
uploader
在前端中无需展示,但前端在展示订阅时可以从中获取对应UP主的信息(如昵称)。nonebot_plugin_bilichat/api/
,挂载在 /{path}/api/
下,在 WebUI 启动时会在日志中输出在本机中的访问地址 http://{ip}:{port}/{path}/api/
,例如 http://127.0.0.1:8080/bilichat/api/
。Windows
3.11.1
2.3.1
5.10.2
发送检测到的动态时报错,包括动态和直播都会报错 但是在bilichat中加入一个模块,这个模块中使用nb本身的接口去send一个字符串或者图片是可以发送的
bilichat_cd_time = 120
bilichat_neterror_retry = 3
bilichat_use_browser = True
bilichat_word_cloud = True
bilichat_official_summary = False
COMMAND_SEP=[""]
COMMAND_START=[""]
bilichat_cmd_start = ""
bilichat_block = True
bilichat_webui_path = "bilichat"
bilichat_cache_serive = "json"
bilichat_only_to_me = True
PORT=5963
词云和总结看来在env配置行为可以进行使用与不使用,不过不知道“基本信息”的这块是否也可以单独启用与禁用,譬如我目前的需求是想单独使用ai的总结,但不出现视频解析信息和词云,词云可以禁用,但解析的基本信息不知道是否可以在env里填写配置禁用,麻烦大佬了😂
对于无意义的视频,现版本的程序会输出一个“无意义”的回复,目前正在考虑新增一个配置项来关闭此输出,但对于具体如何实现和作用范围仍有一些需要考虑的地方。
总之对此功能有任何疑问或建议均可以在此issue下提出,这将极大帮助我们完善此插件的设计工作
希望上下播@全体可以分离
直播通知对开播有高需求,但是下播@全体感觉不太合适
Windows
3.10
lastest
lastest
如题,我看逻辑似乎是在qq端接收smslogin消息,但是qq端如何接入?我之前使用过gocqhttp,但是对这块不太熟,我似乎没有在项目里找到qq端消息接收回调。
如果尚未接入QQ的话,我应该如何登录?能给个教程吗?
No response
No response
有对red协议适配的打算吗?
Windows
3.12.2
1.3.1
3.2.0
Bilichat和playwright均为最新版本,加载Bilichat时报错。
No response
Traceback (most recent call last):
File "", line 12, in
File "C:\Code\nonebot\QQbot.venv\Lib\site-packages\nonebot\plugin\load.py", line 130, in load_from_toml
return load_all_plugins(plugins, plugin_dirs)
File "C:\Code\nonebot\QQbot.venv\Lib\site-packages\nonebot\plugin\load.py", line 64, in load_all_plugins
return manager.load_all_plugins()
File "C:\Code\nonebot\QQbot.venv\Lib\site-packages\nonebot\plugin\manager.py", line 176, in load_all_plugins
return set(
File "C:\Code\nonebot\QQbot.venv\Lib\site-packages\nonebot\plugin\manager.py", line 177, in
filter(None, (self.load_plugin(name) for name in self.available_plugins))
File "C:\Code\nonebot\QQbot.venv\Lib\site-packages\nonebot\plugin\manager.py", line 142, in load_plugin
module = importlib.import_module(name)
File "C:\Code\Python\Lib\importlib_init_.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1387, in _gcd_import
File "", line 1360, in find_and_load
File "", line 1331, in find_and_load_unlocked
File "", line 935, in load_unlocked
File "C:\Code\nonebot\QQbot.venv\Lib\site-packages\nonebot\plugin\manager.py", line 242, in exec_module
super().exec_module(module)
File "", line 995, in exec_module
File "", line 488, in call_with_frames_removed
File "C:\Code\nonebot\QQbot.venv\Lib\site-packages\nonebot_plugin_bilichat_init.py", line 8, in
from . import adatpters
File "C:\Code\nonebot\QQbot.venv\Lib\site-packages\nonebot_plugin_bilichat\adatpters_init.py", line 11, in
from ..content import Column, Dynamic, Video
File "C:\Code\nonebot\QQbot.venv\Lib\site-packages\nonebot_plugin_bilichat\content_init.py", line 2, in
from .dynamic import Dynamic
File "C:\Code\nonebot\QQbot.venv\Lib\site-packages\nonebot_plugin_bilichat\content\dynamic.py", line 4, in
from ..lib.draw.dynamic import draw_dynamic
File "C:\Code\nonebot\QQbot.venv\Lib\site-packages\nonebot_plugin_bilichat\lib\draw\dynamic_init.py", line 6, in
from .browser_shot import screenshot as draw_dynamic
File "C:\Code\nonebot\QQbot.venv\Lib\site-packages\nonebot_plugin_bilichat\lib\draw\dynamic\browser_shot.py", line 10, in
from playwright._impl._api_types import TimeoutError
Linux
3.11.2
1.2.6
4.12.0
nonebot启动失败,无法加载 nonebot_plugin_bilichat
No response
12-06 10:09:20 [ERROR] nonebot | Failed to import "nonebot_plugin_bilichat"
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/root/qqbot/.venv/lib/python3.11/site-packages/nonebot/plugin/load.py", line 130, in load_from_toml
return load_all_plugins(plugins, plugin_dirs)
File "/root/qqbot/.venv/lib/python3.11/site-packages/nonebot/plugin/load.py", line 64, in load_all_plugins
return manager.load_all_plugins()
File "/root/qqbot/.venv/lib/python3.11/site-packages/nonebot/plugin/manager.py", line 176, in load_all_plugins
return set(
File "/root/qqbot/.venv/lib/python3.11/site-packages/nonebot/plugin/manager.py", line 177, in <genexpr>
filter(None, (self.load_plugin(name) for name in self.available_plugins))
> File "/root/qqbot/.venv/lib/python3.11/site-packages/nonebot/plugin/manager.py", line 142, in load_plugin
module = importlib.import_module(name)
File "/usr/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 "/root/qqbot/.venv/lib/python3.11/site-packages/nonebot/plugin/manager.py", line 242, in exec_module
super().exec_module(module)
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/root/qqbot/.venv/lib/python3.11/site-packages/nonebot_plugin_bilichat/__init__.py", line 67, in <module>
from . import adapters, commands, subscribe # noqa: F401, E402
File "/root/qqbot/.venv/lib/python3.11/site-packages/nonebot_plugin_bilichat/subscribe/__init__.py", line 9, in <module>
from .dynamic import fetch_dynamics_grpc, fetch_dynamics_rest
File "/root/qqbot/.venv/lib/python3.11/site-packages/nonebot_plugin_bilichat/subscribe/dynamic.py", line 15, in <module>
from ..adapters.base_content_parsing import check_cd
File "/root/qqbot/.venv/lib/python3.11/site-packages/nonebot_plugin_bilichat/adapters/base_content_parsing.py", line 13, in <module>
from ..summary.text_to_image import t2i
File "/root/qqbot/.venv/lib/python3.11/site-packages/nonebot_plugin_bilichat/summary/__init__.py", line 6, in <module>
from .openai_summarise import openai_summarization
File "/root/qqbot/.venv/lib/python3.11/site-packages/nonebot_plugin_bilichat/summary/openai_summarise.py", line 9, in <module>
from .openai import get_small_size_transcripts, get_summarise_prompt, openai_req
File "/root/qqbot/.venv/lib/python3.11/site-packages/nonebot_plugin_bilichat/summary/openai.py", line 7, in <module>
import tiktoken_async
ModuleNotFoundError: No module named 'tiktoken_async'
Windows
Python 3.12.2
最新
最新
To install, run `rustup component add rustc`
error: can't find Rust compiler
If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.
To update pip, run:
pip install --upgrade pip
and then retry package installation.
If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for tiktoken-async
Failed to build tiktoken-async
ERROR: Could not build wheels for tiktoken-async, which is required to install pyproject.toml-based projects
我网上搜索了一大圈,发现tiktoken最近才兼容Python 3.12,但tiktoken-async并不兼容3.12,只兼容3.11,就算下载了Rust来编译也无法正常工作,导致pip install nonebot-plugin-bilichat[all]往往卡在tiktoken-async那边无法正常运作
No response
No response
Linux
3.10.12
nonebot cli version 1.2.8
5.1.3
nonebot无法回复消息,如输入“/查看”,后台能看到nonebot接受到了消息,但qq无回应,使用的适配器是mirai2,看上去是“Handler Dependent(call=check_sub) skipped”的问题
01-08 22:36:25 [SUCCESS] nonebot | mirai2 1361804427 | [GroupMessage]: {'self_id': ***, 'type': 'GroupMessage', 'message_chain': [{'type': 'Plain', 'data': {'text': '/查看'}}], 'source': {'id': 4259, 'time': '2024-01-08T14:36:25+00:00'}, 'sender': {'id': ***, 'name': '七九殇', 'special_title': '', 'permission': 'MEMBER', 'join_timestamp': 1574145563, 'last_speak_timestamp': 1704724585, 'mute_time_remaining': 0, 'group': {'id': , 'name': '', 'permission': 'MEMBER'}}, 'quote': None, 'to_me': True}
01-08 22:36:25 [DEBUG] nonebot | Checking for matchers in priority 1...
01-08 22:36:25 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_bilichat.commands.subs, lineno=15)
01-08 22:36:25 [DEBUG] nonebot | Running Matcher(type='message', module=nonebot_plugin_bilichat.commands.subs, lineno=15)
01-08 22:36:25 [DEBUG] nonebot | Running handler Dependent(call=check_sub)
01-08 22:36:25 [DEBUG] nonebot | Handler Dependent(call=check_sub) skipped
01-08 22:36:25 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_bilichat.commands.subs, lineno=15) running complete
01-08 22:36:25 [DEBUG] nonebot | Checking for matchers completed
DRIVER=~fastapi+~websockets
HOST=127.0.0.1
PORT=17501
LOG_LEVEL=DEBUG
SUPERUSERS=["***"]
COMMAND_START=["/"]
MIRAI_HOST=localhost
MIRAI_PORT=17500
VERIFY_KEY=***
MIRAI_QQ=[***]
bilichat_cd_time = 120
bilichat_neterror_retry = 3
bilichat_use_browser = True
bilichat_text_fonts = "yahei"
bilichat_webui_path = "bilichat"
bilichat_cache_serive = "json"
bilichat_dynamic = True
bilichat_basic_info = True
bilichat_whitelist = ["***"]
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.