TomLBZ / koishi-plugin-openai

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

使用网络搜索时,机器人返回结果更偏向于回答网络搜索结果而不是实际聊天对话 #24

Closed lingyunytc closed 1 year ago

lingyunytc commented 1 year ago

image image image image

Pafffffff commented 1 year ago

一个建议,现在调用搜索模块机器人响应太慢了,有时候甚至到十秒,希望可以把搜索设为可选功能。

TomLBZ commented 1 year ago

一个建议,现在调用搜索模块机器人响应太慢了,有时候甚至到十秒,希望可以把搜索设为可选功能。

我观察了一下timing,发现大多数情况下最长的调用都是openAI的API,其次是Pinecone的API。Wolfram的API算上了两次翻译的时间也才站很小一部分,搜索和翻译用时是一样的(google版都是fetch一个网页,bing版都是post一个请求拿回一个小小的json)。所以要想响应速度快,需要我尽可能减少OpenAI的调用和Pinecone的调用。已经在写了。

TomLBZ commented 1 year ago

@Pafffffff 根据我的timing记录,OpenAI调用与Pinecone与Search的耗时占比大约是6:3:1

TomLBZ commented 1 year ago

@Pafffffff 根据我的timing记录,OpenAI调用与Pinecone与Search的耗时占比大约是6:3:1

而且openai的api有时候甚至有概率返回个500或者501什么的

TomLBZ commented 1 year ago

image image image image

这个问题看起来是prompt engineering没搞好,我研究研究新的预设的prompt。

TomLBZ commented 1 year ago

@Pafffffff 看样子是OpenAI的问题

TomLBZ commented 1 year ago

ver 2.0.5 已修复