Closed HaoTian22 closed 1 year ago
此问题是请求失败造成的,一般是网络波动造成的,你可以尝试更换更稳定的网络环境。
另外我没太理解那个cookies到底要放在哪里
你直接填写cookie文件的路径即可,例如 bilichat_newbing_cookie="/home/username/bots/cookies.json"
,只要程序可以以文件形式读取此文件,你放到哪里都没问题
我重试了好几次,貌似同一个视频都是同样的问题,多次平均都是网络问题的概率有点低吧?(而且我另一个bingchat的插件是能正常使用的) 还有另一些视频有以下报错
04-23 00:06:53 [ERROR] nonebot_plugin_bilichat | Video(Column) av910302758 summary failed: 'messages'
Traceback (most recent call last):
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 83, in newbing_req
bing_resp: Dict = ans["item"]["messages"][1]
KeyError: 'messages'
我重试了好几次,貌似同一个视频都是同样的问题,多次平均都是网络问题的概率有点低吧?(而且我另一个bingchat的插件是能正常使用的)
因为需要将视频的字幕也传输过去,正常情况下使用newbing的请求大小远低于此插件的请求大小,而且你第一个测试的视频 av441997088
是一个长达40分钟的视频,其文本量可能会超过1万字。
如果同一个视频反复出错仍然考虑是你的网络质量有问题,或是超出了newbing能容纳的上限(但具体是多少未知),你可以考虑设置 bilichat_newbing_token_limit
为一个较低的数值以降低网络的影响。
还有另一些视频有以下报错
此处也可能是解析错误,如果能够复现的话,可以将 loglevel 设置为 DEBUG 或更低,这样就能看到 newbing 完整的返回信息了。在没有这部分信息之前我也无法做出进一步推论和bug修复。
哦,我大概理解了,尝试生成几分钟(3000char)的视频依然需要花费近2分钟的时间,通过比对时间发现,我以上错误貌似都发生在请求的5秒之内,超过5秒没问题的那大概率是成功了的,谢谢你的帮助 至于具体网络什么因素导致的,可能我还得要进一步研究(这个连DEBUG都提供没什么有用的信息)
哦,我大概理解了,尝试生成几分钟(3000char)的视频依然需要花费近2分钟的时间,通过比对时间发现,我以上错误貌似都发生在请求的5秒之内,超过5秒没问题的那大概率是成功了的,谢谢你的帮助
是的,当场就能生成回答的大概率就是newbing把会话掐了,需要一定时间的是通过审核且正在查询的。
至于具体网络什么因素导致的,可能我还得要进一步研究(这个连DEBUG都提供没什么有用的信息)
debug中的信息是有用的,在报错前的最后一条就应该是bing返回的信息,我需要这个信息来判断是不是有新的返回格式,或者现在的解析是否出现问题了
不,在出错的情况下,error的上面是
04-23 07:22:30 [INFO] nonebot_plugin_bilichat | Generation summary of Video(Column) av441997088
04-23 07:22:30 [DEBUG] nonebot_plugin_bilichat | prompt have 13518 chars
04-23 07:22:30 [DEBUG] nonebot_plugin_bilichat | an error has occurred, but sentry_sdk is not installed
04-23 07:22:30 [ERROR] nonebot_plugin_bilichat | Video(Column) av527087544 summary failed: sent 1000 (OK); then received 1000 (OK)
意味着貌似bing直接没有返回?
不,在出错的情况下,error的上面是
04-23 07:22:30 [INFO] nonebot_plugin_bilichat | Generation summary of Video(Column) av441997088 04-23 07:22:30 [DEBUG] nonebot_plugin_bilichat | prompt have 13518 chars 04-23 07:22:30 [DEBUG] nonebot_plugin_bilichat | an error has occurred, but sentry_sdk is not installed 04-23 07:22:30 [ERROR] nonebot_plugin_bilichat | Video(Column) av527087544 summary failed: sent 1000 (OK); then received 1000 (OK)
意味着貌似bing直接没有返回?
呃呃,我要的是你keyerror的那个报错的回复啊,你这个我已经解释过了是文本量过长了。
那个我貌似今天都没出现过了,等哪天再见到我再发吧
请问这个应该如何解决?
另外我没太理解那个cookies到底要放在哪里,因此每个子目录应该都放了一个,配置里面也写了http代理