ChatLunaLab / chatluna

多平台模型接入,可扩展,多种输出格式,提供大语言模型聊天服务的机器人插件
https://chatluna.chat
GNU Affero General Public License v3.0
132 stars 19 forks source link

[Bug] 第三方类 opneai 平台无法正常使用(gptgod) #167

Closed SummonHIM closed 3 months ago

SummonHIM commented 3 months ago

image image

在 Docker 环境下的 Koishi:v4.17.5 无法正常读取模型列表,并在对话时报错

2024-05-04 20:49:05 [E] chatluna chat-chain: resolve_model error TypeError: Cannot read properties of undefined (reading 'platform')
2024-05-04 20:49:05 [E] chatluna TypeError: Cannot read properties of undefined (reading 'platform')
                            at checkConversationRoomAvailability (/koishi/node_modules/koishi-plugin-chatluna/lib/chains/rooms.js:63:42)
                            at getTemplateConversationRoom (/koishi/node_modules/koishi-plugin-chatluna/lib/chains/rooms.js:131:17)
                            at fixConversationRoomAvailability (/koishi/node_modules/koishi-plugin-chatluna/lib/chains/rooms.js:88:29)
                            at ChainMiddleware.execute (/koishi/node_modules/koishi-plugin-chatluna/lib/middlewares/resolve_model.js:15:59)
                            at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
                            at async ChatChain._runMiddleware (/koishi/node_modules/koishi-plugin-chatluna/lib/chains/chain.js:109:26)
                            at async ChatChain.receiveMessage (/koishi/node_modules/koishi-plugin-chatluna/lib/chains/chain.js:52:24)
                            at async /koishi/node_modules/koishi-plugin-chatluna/lib/index.js:105:21
                            at async next (/koishi/node_modules/@koishijs/core/lib/index.cjs:888:16)
                            at async next (/koishi/node_modules/@koishijs/core/lib/index.cjs:888:16)
SummonHIM commented 3 months ago

我有点搞不清楚如何解决了,还请大佬答疑

dingyi222666 commented 3 months ago

有没有刚启动时候的日志,考虑是模型适配器未加载成功模型列表

SummonHIM commented 3 months ago
2024-05-04 20:45:03 [I] app Koishi/4.17.5
2024-05-04 20:45:03 [I] loader apply plugin group:entry
2024-05-04 20:45:03 [I] loader apply plugin group:server
2024-05-04 20:45:03 [I] loader apply plugin server:g8sh6j
2024-05-04 20:45:03 [I] loader apply plugin group:basic
2024-05-04 20:45:03 [I] loader apply plugin commands:oxvc7j
2024-05-04 20:45:03 [I] loader apply plugin help:p4y68o
2024-05-04 20:45:03 [I] loader apply plugin locales:ryek11
2024-05-04 20:45:03 [I] loader apply plugin proxy-agent:ve9nx4
2024-05-04 20:45:03 [I] loader apply plugin rate-limit:ce232e
2024-05-04 20:45:03 [I] loader apply plugin telemetry:szx16i
2024-05-04 20:45:03 [I] loader apply plugin @summonhim/dice-roller:rxrjk2
2024-05-04 20:45:03 [I] loader apply plugin image-search:825k2d
2024-05-04 20:45:03 [I] loader apply plugin repeater:hm8mur
2024-05-04 20:45:03 [I] loader apply plugin schedule:nrdfhk
2024-05-04 20:45:03 [I] loader apply plugin verifier:6fy6te
2024-05-04 20:45:03 [I] loader apply plugin group:urk2b0
2024-05-04 20:45:03 [I] loader apply plugin group:0fy5i4
2024-05-04 20:45:03 [I] loader apply plugin group:console
2024-05-04 20:45:03 [I] loader apply plugin actions:3hqzx9
2024-05-04 20:45:03 [I] loader apply plugin analytics:59zope
2024-05-04 20:45:03 [I] loader apply plugin config:24pzfw
2024-05-04 20:45:03 [I] loader apply plugin console:0rw3d4
2024-05-04 20:45:03 [I] loader apply plugin dataview:8fmb1q
2024-05-04 20:45:03 [I] loader apply plugin explorer:6dpcga
2024-05-04 20:45:03 [I] loader apply plugin logger:rcbhq3
2024-05-04 20:45:03 [I] loader apply plugin insight:xunv6f
2024-05-04 20:45:03 [I] loader apply plugin market:qbrhvp
2024-05-04 20:45:03 [I] loader apply plugin notifier:u0f0ee
2024-05-04 20:45:03 [I] loader apply plugin oobe:q3npw7
2024-05-04 20:45:03 [I] loader apply plugin sandbox:fey5dv
2024-05-04 20:45:03 [I] loader apply plugin status:mj2k98
2024-05-04 20:45:03 [I] loader apply plugin theme-vanilla:hqquev
2024-05-04 20:45:03 [I] loader apply plugin puppeteer:rek8yn
2024-05-04 20:45:04 [I] loader apply plugin group:storage
2024-05-04 20:45:04 [I] loader apply plugin database-sqlite:hi4tt8
2024-05-04 20:45:04 [I] loader apply plugin assets-local:e5rowk
2024-05-04 20:45:04 [I] loader apply plugin cache-database:xxvo6g
2024-05-04 20:45:04 [I] loader apply plugin group:adapter
2024-05-04 20:45:04 [I] loader apply plugin adapter-onebot:7saned
2024-05-04 20:45:04 [I] assets missing config "selfUrl", fallback to "file:" scheme
2024-05-04 20:45:04 [I] puppeteer chrome executable found at /usr/bin/chromium
2024-05-04 20:45:04 [I] server server listening at http://0.0.0.0:5140
2024-05-04 20:45:04 [I] console webui is available at http://127.0.0.1:5140
2024-05-04 20:45:04 [I] adapter connect to server: ws://192.168.2.1:8090/
2024-05-04 20:45:17 [I] loader apply plugin chatluna-plugin-common:36lnhc
2024-05-04 20:45:24 [I] loader apply plugin chatluna:x9s107
2024-05-04 20:45:24 [S] chatluna register plugin plugin-common
2024-05-04 20:45:29 [I] loader apply plugin chatluna-openai-adapter:h3007f
2024-05-04 20:45:29 [S] chatluna register plugin openai
2024-05-04 20:45:43 [I] loader reload plugin chatluna:x9s107
2024-05-04 20:45:43 [E] chatluna chat-chain: resolve_model error TypeError: Cannot read properties of undefined (reading 'platform')
2024-05-04 20:45:43 [E] chatluna TypeError: Cannot read properties of undefined (reading 'platform')
                            at checkConversationRoomAvailability (/koishi/node_modules/koishi-plugin-chatluna/lib/chains/rooms.js:63:42)
                            at getTemplateConversationRoom (/koishi/node_modules/koishi-plugin-chatluna/lib/chains/rooms.js:131:17)
                            at fixConversationRoomAvailability (/koishi/node_modules/koishi-plugin-chatluna/lib/chains/rooms.js:88:29)
                            at ChainMiddleware.execute (/koishi/node_modules/koishi-plugin-chatluna/lib/middlewares/resolve_model.js:15:59)
                            at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
                            at async ChatChain._runMiddleware (/koishi/node_modules/koishi-plugin-chatluna/lib/chains/chain.js:109:26)
                            at async ChatChain.receiveMessage (/koishi/node_modules/koishi-plugin-chatluna/lib/chains/chain.js:52:24)
                            at async /koishi/node_modules/koishi-plugin-chatluna/lib/index.js:105:21
                            at async next (/koishi/node_modules/@koishijs/core/lib/index.cjs:888:16)
                            at async next (/koishi/node_modules/@koishijs/core/lib/index.cjs:888:16)
2024-05-04 20:45:43 [S] chatluna unregister plugin plugin-common
2024-05-04 20:45:43 [S] chatluna unregister plugin openai
2024-05-04 20:45:44 [S] chatluna register plugin plugin-common
2024-05-04 20:45:45 [S] chatluna register plugin openai
2024-05-04 20:49:05 [I] loader reload plugin chatluna:x9s107
2024-05-04 20:49:05 [E] chatluna chat-chain: resolve_model error TypeError: Cannot read properties of undefined (reading 'platform')
2024-05-04 20:49:05 [E] chatluna TypeError: Cannot read properties of undefined (reading 'platform')
                            at checkConversationRoomAvailability (/koishi/node_modules/koishi-plugin-chatluna/lib/chains/rooms.js:63:42)
                            at getTemplateConversationRoom (/koishi/node_modules/koishi-plugin-chatluna/lib/chains/rooms.js:131:17)
                            at fixConversationRoomAvailability (/koishi/node_modules/koishi-plugin-chatluna/lib/chains/rooms.js:88:29)
                            at ChainMiddleware.execute (/koishi/node_modules/koishi-plugin-chatluna/lib/middlewares/resolve_model.js:15:59)
                            at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
                            at async ChatChain._runMiddleware (/koishi/node_modules/koishi-plugin-chatluna/lib/chains/chain.js:109:26)
                            at async ChatChain.receiveMessage (/koishi/node_modules/koishi-plugin-chatluna/lib/chains/chain.js:52:24)
                            at async /koishi/node_modules/koishi-plugin-chatluna/lib/index.js:105:21
                            at async next (/koishi/node_modules/@koishijs/core/lib/index.cjs:888:16)
                            at async next (/koishi/node_modules/@koishijs/core/lib/index.cjs:888:16)
2024-05-04 20:49:05 [S] chatluna unregister plugin plugin-common
2024-05-04 20:49:05 [S] chatluna unregister plugin openai
2024-05-04 20:49:05 [S] chatluna register plugin plugin-common
2024-05-04 20:49:06 [S] chatluna register plugin openai
2024-05-04 20:54:31 [I] loader unload plugin chatluna:x9s107
2024-05-04 20:54:31 [S] chatluna unregister plugin plugin-common
2024-05-04 20:54:31 [S] chatluna unregister plugin openai
2024-05-04 20:54:32 [I] loader unload plugin chatluna-openai-adapter:h3007f
2024-05-04 20:54:34 [I] loader unload plugin chatluna-plugin-common:36lnhc

启动的日志似乎并没有什么错误

dingyi222666 commented 3 months ago

主插件那边有没有模型列表显示(模板房间里

SummonHIM commented 3 months ago

image

dingyi222666 commented 3 months ago

去群里加我 Q 私聊吧,这周找个时间可能需要远程一下看看

dingyi222666 commented 3 months ago

finish