@tomlbz/openai更新发布,ChatGPT聊天+超长记忆+计算推理+搜索联想,一站方案

关于@tomlbz/koishi-plugin-openai的问题


这是什么问题呢,该怎么解决

2 个赞

是网络问题喵 你需要更换更优质的网络环境 或使用代理

1 个赞

我在使用代理喵 应该是我电脑的问题喵 (我挂代理之前和挂代理之后的报错不太一样喵 ::)

1 个赞

喵喵开始传染了喵!

1 个赞

大佬好,之前一直用的很顺利,昨天重启Koishi后突然开始报错

TypeError: Cannot read properties of undefined (reading '0')
                            at AI._updateModels (XXX\Koishi\Desktop\data\instances\default\node_modules\@tomlbz\koishi-plugin-openai\lib\ai.js:80:42)
                            at AI.init (XXX\Koishi\Desktop\data\instances\default\node_modules\@tomlbz\koishi-plugin-openai\lib\ai.js:19:21)
                            at runMicrotasks (<anonymous>)
                            at processTicksAndRejections (node:internal/process/task_queues:96:5)
                            at async XXX\Koishi\Desktop\data\instances\default\node_modules\@tomlbz\koishi-plugin-openai\lib\index.js:35:21

但是我什么都没改过,我自己也无法定位原因,会不会是GET https://api.openai.com/v1/models 的返回数据格式变了?

Koishi版本:4.12.1(最新)
koishi-plugin-openai版本:2.0.6(最新)
下载和更新都是在插件市场里进行的,也没改过源码

重启后完整的koishi日志如下:

2023-03-25 11:15:36 [I] app Koishi/4.12.1
2023-03-25 11:15:36 [I] app apply plugin group:entry
2023-03-25 11:15:36 [I] app apply plugin help
2023-03-25 11:15:36 [I] app apply plugin locales
2023-03-25 11:15:36 [I] app apply plugin group:basic
2023-03-25 11:15:36 [I] app apply plugin group:console
2023-03-25 11:15:36 [I] app apply plugin commands
2023-03-25 11:15:36 [I] app apply plugin rate-limit
2023-03-25 11:15:36 [I] app apply plugin analytics
2023-03-25 11:15:36 [I] app apply plugin console
2023-03-25 11:15:36 [I] app apply plugin desktop
2023-03-25 11:15:36 [I] app apply plugin dataview
2023-03-25 11:15:36 [I] app apply plugin logger
2023-03-25 11:15:36 [I] app apply plugin insight
2023-03-25 11:15:36 [I] app apply plugin market
2023-03-25 11:15:36 [I] app apply plugin sandbox
2023-03-25 11:15:36 [I] app apply plugin group:database
2023-03-25 11:15:36 [I] app apply plugin status
2023-03-25 11:15:36 [I] app apply plugin database-sqlite
2023-03-25 11:15:36 [I] app apply plugin assets-local
2023-03-25 11:15:36 [I] app apply plugin group:adapter
2023-03-25 11:15:36 [I] app apply plugin group:AI
2023-03-25 11:15:36 [I] app apply plugin adapter-onebot:htwkro
2023-03-25 11:15:36 [I] app apply plugin gocqhttp:om2319
2023-03-25 11:15:36 [I] app apply plugin novelai:ry2uvf
2023-03-25 11:15:36 [I] app apply plugin @tomlbz/openai:f5k0dl
2023-03-25 11:15:37 [I] app apply plugin @miemiemie/gpt-girlfriend:i4p52g
2023-03-25 11:15:37 [I] app apply plugin group:0rs1e2
2023-03-25 11:15:37 [I] app apply plugin @miemiemie/gpt-api:pg2ps8
2023-03-25 11:15:37 [I] app apply plugin image-search:kup9yq
2023-03-25 11:15:37 [I] app apply plugin @rinkuto/pixiv:lowrm4
2023-03-25 11:15:37 [I] app apply plugin send-as-image:b2ym8o
2023-03-25 11:15:37 [I] app apply plugin puppeteer:rr9284
2023-03-25 11:15:37 [I] assets missing config "selfUrl", fallback to "file:" scheme
2023-03-25 11:15:37 [I] app apply plugin translator-bing:9blqf3
2023-03-25 11:15:37 [I] app server listening at http://localhost:5140
2023-03-25 11:15:37 [I] puppeteer chrome executable found at C:\Program Files\Google\Chrome\Application\chrome.exe
2023-03-25 11:15:38 [I] locales loading locale zh.yml
2023-03-25 11:15:39 [W] app TypeError: Cannot read properties of undefined (reading '0')
                            at AI._updateModels (XXX\Koishi\Desktop\data\instances\default\node_modules\@tomlbz\koishi-plugin-openai\lib\ai.js:80:42)
                            at AI.init (XXX\Koishi\Desktop\data\instances\default\node_modules\@tomlbz\koishi-plugin-openai\lib\ai.js:19:21)
                            at processTicksAndRejections (node:internal/process/task_queues:96:5)
                            at async XXX\Koishi\Desktop\data\instances\default\node_modules\@tomlbz\koishi-plugin-openai\lib\index.js:35:21
                            at async Promise.all (index 21)
                            at async Lifecycle.flush (XXX\Koishi\Desktop\data\instances\default\node_modules\cordis\lib\index.cjs:77:7)
                            at async Lifecycle.start (XXX\Koishi\Desktop\data\instances\default\node_modules\cordis\lib\index.cjs:164:5)
                            at async start (XXX\Koishi\Desktop\data\instances\default\node_modules\koishi\lib\worker\index.js:171:3)
2023-03-25 11:15:39 [W] gocqhttp Protocol -> device lock is disable. http api may fail.
4 个赞

我也出现了同样的问题,前几天重启还可以解决,现在怎么弄都修不好

1 个赞

同样出现了问题,坐等修复

1 个赞


请问这怎么解决

1 个赞

这是由于你的网络环境不佳所致,更换至更优质的网络环境即可解决。


请问一下这个问题怎么解决呀

1 个赞