TomLBZ / koishi-plugin-openai

Calls OpenAI API for Koishi.js
48 stars 10 forks source link

提问后查看日志报错 #31

Open dfaofeng opened 1 year ago

dfaofeng commented 1 year ago

版本是2.0.6 错误信息

2023-03-13 14:16:14 [I] @tomlbz/openai/eye private message, Alice: ai现在北京时间
w-koishi-1  | 2023-03-13 14:16:16 [I] @tomlbz/openai Input Keywords: ["北京时间"]
w-koishi-1  | 2023-03-13 14:16:16 [W] session ai现在北京时间
session ai   aaa
w-koishi-1  |                         TypeError: Cannot read properties of undefined (reading 'length')
w-koishi-1  |                             at Eye.basePrompt (/koishi/node_modules/@tomlbz/koishi-plugin-openai/lib/eye.js:123:30)
w-koishi-1  |                             at /koishi/node_modules/@tomlbz/koishi-plugin-openai/lib/index.js:87:30
w-koishi-1  |                             at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
w-koishi-1  |                             at async next (/koishi/node_modules/@koishijs/core/lib/index.cjs:853:16)
w-koishi-1  |                             at async next (/koishi/node_modules/@koishijs/core/lib/index.cjs:853:16)
w-koishi-1  |                             at async next (/koishi/node_modules/@koishijs/core/lib/index.cjs:853:16)
w-koishi-1  |                             at async next (/koishi/node_modules/@koishijs/core/lib/index.cjs:853:16)
w-koishi-1  |                             at async Processor._handleMessage (/koishi/node_modules/@koishijs/core/lib/index.cjs:864:22)
StringKe commented 1 year ago

2023-03-16 15:00:53 [I] @tomlbz/openai/ai OpenAI Connected. Chat model: gpt-3.5-turbo 2023-03-16 15:00:54 [I] @tomlbz/openai/soul Mem(Long+Cache), TransL(Google), Search(Google) 2023-03-16 15:00:56 [I] @tomlbz/openai/soul Pinecone: us-east-1-aws/bot, Dimension: 4096 2023-03-16 15:00:56 [I] @tomlbz/openai/eye Eye Created. Available names: 图灵 2023-03-16 15:00:56 [I] @tomlbz/openai/cache Cache loaded from cache/cache.json 2023-03-16 15:00:56 [I] @tomlbz/openai Initialization: AI(√) Soul(√) Eye(√) Cache(√) 2023-03-16 15:01:16 [I] @tomlbz/openai/eye private message, xxxxxxx: 你好 2023-03-16 15:01:18 [I] @tomlbz/openai Input Keywords: [] 2023-03-16 15:01:20 [W] session 你好 AxiosError: Request failed with status code 400 at settle (/Users/chen/Project/Bots/node_modules/.pnpm/axios@1.1.3/node_modules/axios/dist/node/axios.cjs:1268:12) at IncomingMessage.handleStreamEnd (/Users/chen/Project/Bots/node_modules/.pnpm/axios@1.1.3/node_modules/axios/dist/node/axios.cjs:2446:11) at IncomingMessage.emit (node:events:525:35) at endReadableNT (node:internal/streams/readable:1359:12) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) 2023-03-16 15:01:24 [I] @tomlbz/openai/eye appelled, xxxxxxx: 如果人类创造出物质飞越空间的技术,需要多久时间 2023-03-16 15:01:27 [I] @tomlbz/openai Input Keywords: ["多久","技术"] 2023-03-16 15:01:27 [W] session 如果人类创造出物质飞越空间的技术,需要多久时间 TypeError: Cannot read properties of undefined (reading 'length')

TomLBZ commented 1 year ago

2.0.8是否还有这个问题?