TomLBZ / koishi-plugin-openai

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

使用时报错 #17

Closed Haku530 closed 1 year ago

Haku530 commented 1 year ago

叫名字时报错: TypeError: this._names is not iterable at Eye._mentionedName (C:\deve\dev\node_modules\@tomlbz\koishi-plugin-openai\lib\eye.js:29:33) at Eye.readInput (C:\deve\dev\node_modules\@tomlbz\koishi-plugin-openai\lib\eye.js:40:22) at C:\deve\dev\node_modules\@tomlbz\koishi-plugin-openai\lib\index.js:51:27 at next (C:\deve\dev\node_modules\@koishijs\core\lib\index.cjs:853:69) at C:\deve\dev\node_modules\koishi-plugin-davinci-003\lib\index.js:124:20 at next (C:\deve\dev\node_modules\@koishijs\core\lib\index.cjs:853:69) at C:\deve\dev\node_modules\koishi-plugin-marry\lib\index.js:46:16 at next (C:\deve\dev\node_modules\@koishijs\core\lib\index.cjs:853:69) at C:\deve\dev\node_modules\@koishijs\core\lib\index.cjs:1809:16 at next (C:\deve\dev\node_modules\@koishijs\core\lib\index.cjs:853:69) 2023-03-06 20:50:10 [W] app Error: connect ETIMEDOUT 103.252.115.59:443 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16) at时报错:[W] session 你好 TypeError: Cannot read properties of undefined (reading 'get') at Cache.get (C:\deve\dev\node_modules\@tomlbz\koishi-plugin-openai\lib\cache.js:47:28) at C:\deve\dev\node_modules\@tomlbz\koishi-plugin-openai\lib\index.js:55:20 at next (C:\deve\dev\node_modules\@koishijs\core\lib\index.cjs:853:69) at C:\deve\dev\node_modules\koishi-plugin-davinci-003\lib\index.js:124:20 at next (C:\deve\dev\node_modules\@koishijs\core\lib\index.cjs:853:69) at C:\deve\dev\node_modules\koishi-plugin-marry\lib\index.js:46:16 at next (C:\deve\dev\node_modules\@koishijs\core\lib\index.cjs:853:69) at C:\deve\dev\node_modules\@koishijs\core\lib\index.cjs:1814:14 at next (C:\deve\dev\node_modules\@koishijs\core\lib\index.cjs:853:69) at C:\deve\dev\node_modules\@koishijs\core\lib\index.cjs:1803:16 2023-03-06 20:53:07 [I] @tomlbz/openai Cooldown: 3757ms < 5000ms, skipping... 2023-03-06 20:53:17 [W] app Error: connect ETIMEDOUT 104.23.125.189:443 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16)

TomLBZ commented 1 year ago

请问你设置名字和昵称了么?

TomLBZ commented 1 year ago

叫名字时报错: TypeError: this._names is not iterable at Eye._mentionedName (C:\deve\dev\node_modules@tomlbz\koishi-plugin-openai\lib\eye.js:29:33)

这个错误是因为名字为空

TypeError: Cannot read properties of undefined (reading 'get') at Cache.get (C:\deve\dev\node_modules@tomlbz\koishi-plugin-openai\lib\cache.js:47:28)

这个错误来自Cache.get(),这个函数只有两个引用,都是cache.get(username)。从这两个错误看起来,似乎是名字的问题。

我在本地无法复现,你能否把详细配置(去掉敏感信息)和复现步骤发上来,我试着复现一下?

Haku530 commented 1 year ago

我填了openai插件的apikey,botname,关掉了isnickname,小改了人设与示例对话,基本没有大改动。填写完这些后,复现过程就是叫botname和at它,分别会出现上面的两个报错

Pafffffff commented 1 year ago

我也出现了同样的问题,配置也和题主一样。

TomLBZ commented 1 year ago

本地复现中……

yi03 commented 1 year ago

https://koishi.chat/api/service/http.html#%E7%BD%91%E7%BB%9C%E8%AF%B7%E6%B1%82 另外我看到有一些网络请求的代码,建议大佬都使用ctx.http,这样国内挂代理才能接管这些流量。普通的代理软件是代理不了ts package发的网络请求的。

TomLBZ commented 1 year ago

https://koishi.chat/api/service/http.html#%E7%BD%91%E7%BB%9C%E8%AF%B7%E6%B1%82 另外我看到有一些网络请求的代码,建议大佬都使用ctx.http,这样国内挂代理才能接管这些流量。普通的代理软件是代理不了ts package发的网络请求的。

这是重要信息。我试着全部换成ctx.http。 我人在国外所以确实不知道国内代理使用的问题,我这边一直复现不出来看来的确和网络请求有关。

TomLBZ commented 1 year ago

已更新至2.0.2,移除了对openaipinecone等库的依赖,全面换成context.http.get()/post()koishi内置API。希望能解决代理困难的问题,请去更新。

该版本我在本地测试没有问题,没有在国内网络环境进行测试的条件。如果在国内运行发现bug没有修复,请继续在这里回复。

Haku530 commented 1 year ago

我的两个bug没有修复,不知道其他人怎么样 2023-03-07 07:36:00 [W] session 你好 TypeError: Cannot read properties of undefined (reading 'get') at Cache.get (C:\deve\dev\node_modules\@tomlbz\koishi-plugin-openai\lib\cache.js:47:28) at C:\deve\dev\node_modules\@tomlbz\koishi-plugin-openai\lib\index.js:65:20 at next (C:\deve\dev\node_modules\@koishijs\core\lib\index.cjs:853:69) at C:\deve\dev\node_modules\koishi-plugin-davinci-003\lib\index.js:124:20 at next (C:\deve\dev\node_modules\@koishijs\core\lib\index.cjs:853:69) at C:\deve\dev\node_modules\@koishijs\core\lib\index.cjs:1814:14 at next (C:\deve\dev\node_modules\@koishijs\core\lib\index.cjs:853:69) at C:\deve\dev\node_modules\@koishijs\core\lib\index.cjs:1803:16 at next (C:\deve\dev\node_modules\@koishijs\core\lib\index.cjs:853:69) at Processor._process (C:\deve\dev\node_modules\@koishijs\core\lib\index.cjs:832:12) 2023-03-07 07:36:09 [W] app Error: connect ETIMEDOUT 157.240.13.8:443 at AxiosError.from (C:\deve\dev\node_modules\axios\dist\node\axios.cjs:725:14) at RedirectableRequest.handleRequestError (C:\deve\dev\node_modules\axios\dist\node\axios.cjs:2467:25) at RedirectableRequest.emit (node:events:513:28) at eventHandlers. (C:\deve\dev\node_modules\follow-redirects\index.js:14:24) at ClientRequest.emit (node:events:513:28) at TLSSocket.socketErrorListener (node:_http_client:502:9) at TLSSocket.emit (node:events:513:28) at emitErrorNT (node:internal/streams/destroy:151:8) at emitErrorCloseNT (node:internal/streams/destroy:116:3) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) 2023-03-07 07:36:14 [I] app unload plugin @tomlbz/openai:8qumb9 2023-03-07 07:36:17 [I] app apply plugin @tomlbz/openai:8qumb9 2023-03-07 07:36:34 [W] session 魔理沙你好 TypeError: this._names is not iterable at Eye._mentionedName (C:\deve\dev\node_modules\@tomlbz\koishi-plugin-openai\lib\eye.js:29:33) at Eye.readInput (C:\deve\dev\node_modules\@tomlbz\koishi-plugin-openai\lib\eye.js:40:22) at C:\deve\dev\node_modules\@tomlbz\koishi-plugin-openai\lib\index.js:61:27 at next (C:\deve\dev\node_modules\@koishijs\core\lib\index.cjs:853:69) at C:\deve\dev\node_modules\koishi-plugin-marry\lib\index.js:46:16 at next (C:\deve\dev\node_modules\@koishijs\core\lib\index.cjs:853:69) at C:\deve\dev\node_modules\koishi-plugin-davinci-003\lib\index.js:124:20 at next (C:\deve\dev\node_modules\@koishijs\core\lib\index.cjs:853:69) at C:\deve\dev\node_modules\@koishijs\core\lib\index.cjs:1809:16 at next (C:\deve\dev\node_modules\@koishijs\core\lib\index.cjs:853:69) 2023-03-07 07:36:39 [W] app Error: connect ETIMEDOUT 157.240.13.8:443 at AxiosError.from (C:\deve\dev\node_modules\axios\dist\node\axios.cjs:725:14) at RedirectableRequest.handleRequestError (C:\deve\dev\node_modules\axios\dist\node\axios.cjs:2467:25) at RedirectableRequest.emit (node:events:513:28) at eventHandlers. (C:\deve\dev\node_modules\follow-redirects\index.js:14:24) at ClientRequest.emit (node:events:513:28) at TLSSocket.socketErrorListener (node:_http_client:502:9) at TLSSocket.emit (node:events:513:28) at emitErrorNT (node:internal/streams/destroy:151:8) at emitErrorCloseNT (node:internal/streams/destroy:116:3) at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

yi03 commented 1 year ago

~我没再报之前的错了,改报这个错了。~ 换了个节点后好了,现在能用了。

2023-03-07 08:43:36 [I] @tomlbz/openai/soul/search Knowledge Mode: none
2023-03-07 08:43:37 [I] @tomlbz/openai/ai Chat model: gpt-3.5-turbo
2023-03-07 08:43:37 [I] @tomlbz/openai/eye Keywords: none
2023-03-07 08:43:38 [W] session <at id="1378309923"/> 你好
                        AxiosError: Request failed with status code 502
                            at settle (C:\Users\allegray\koishi-bot\koishi-app6\node_modules\axios\dist\node\axios.cjs:1268:12)
                            at IncomingMessage.handleStreamEnd (C:\Users\allegray\koishi-bot\koishi-app6\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-07 08:43:38 [I] @tomlbz/openai/eye Keywords: none
2023-03-07 08:43:38 [W] session <at id="1378309923"/> hi
                        AxiosError: Request failed with status code 502
                            at settle (C:\Users\allegray\koishi-bot\koishi-app6\node_modules\axios\dist\node\axios.cjs:1268:12)
                            at IncomingMessage.handleStreamEnd (C:\Users\allegray\koishi-bot\koishi-app6\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)
yi03 commented 1 year ago

我的两个bug没有修复,不知道其他人怎么样 2023-03-07 07:36:00 [W] session 你好 TypeError: Cannot read properties of undefined (reading 'get') at Cache.get (C:\deve\dev\node_modules@tomlbz\koishi-plugin-openai\lib\cache.js:47:28) at C:\deve\dev\node_modules@tomlbz\koishi-plugin-openai\lib\index.js:65:20 at next (C:\deve\dev\node_modules@koishijs\core\lib\index.cjs:853:69) at C:\deve\dev\node_modules\koishi-plugin-davinci-003\lib\index.js:124:20 at next (C:\deve\dev\node_modules@koishijs\core\lib\index.cjs:853:69) at C:\deve\dev\node_modules@koishijs\core\lib\index.cjs:1814:14 at next (C:\deve\dev\node_modules@koishijs\core\lib\index.cjs:853:69) at C:\deve\dev\node_modules@koishijs\core\lib\index.cjs:1803:16 at next (C:\deve\dev\node_modules@koishijs\core\lib\index.cjs:853:69) at Processor._process (C:\deve\dev\node_modules@koishijs\core\lib\index.cjs:832:12) 2023-03-07 07:36:09 [W] app Error: connect ETIMEDOUT 157.240.13.8:443 at AxiosError.from (C:\deve\dev\node_modules\axios\dist\node\axios.cjs:725:14) at RedirectableRequest.handleRequestError (C:\deve\dev\node_modules\axios\dist\node\axios.cjs:2467:25) at RedirectableRequest.emit (node:events:513:28) at eventHandlers. (C:\deve\dev\node_modules\follow-redirects\index.js:14:24) at ClientRequest.emit (node:events:513:28) at TLSSocket.socketErrorListener (node:_http_client:502:9) at TLSSocket.emit (node:events:513:28) at emitErrorNT (node:internal/streams/destroy:151:8) at emitErrorCloseNT (node:internal/streams/destroy:116:3) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) 2023-03-07 07:36:14 [I] app unload plugin @tomlbz/openai:8qumb9 2023-03-07 07:36:17 [I] app apply plugin @tomlbz/openai:8qumb9 2023-03-07 07:36:34 [W] session 魔理沙你好 TypeError: this._names is not iterable at Eye._mentionedName (C:\deve\dev\node_modules@tomlbz\koishi-plugin-openai\lib\eye.js:29:33) at Eye.readInput (C:\deve\dev\node_modules@tomlbz\koishi-plugin-openai\lib\eye.js:40:22) at C:\deve\dev\node_modules@tomlbz\koishi-plugin-openai\lib\index.js:61:27 at next (C:\deve\dev\node_modules@koishijs\core\lib\index.cjs:853:69) at C:\deve\dev\node_modules\koishi-plugin-marry\lib\index.js:46:16 at next (C:\deve\dev\node_modules@koishijs\core\lib\index.cjs:853:69) at C:\deve\dev\node_modules\koishi-plugin-davinci-003\lib\index.js:124:20 at next (C:\deve\dev\node_modules@koishijs\core\lib\index.cjs:853:69) at C:\deve\dev\node_modules@koishijs\core\lib\index.cjs:1809:16 at next (C:\deve\dev\node_modules@koishijs\core\lib\index.cjs:853:69) 2023-03-07 07:36:39 [W] app Error: connect ETIMEDOUT 157.240.13.8:443 at AxiosError.from (C:\deve\dev\node_modules\axios\dist\node\axios.cjs:725:14) at RedirectableRequest.handleRequestError (C:\deve\dev\node_modules\axios\dist\node\axios.cjs:2467:25) at RedirectableRequest.emit (node:events:513:28) at eventHandlers. (C:\deve\dev\node_modules\follow-redirects\index.js:14:24) at ClientRequest.emit (node:events:513:28) at TLSSocket.socketErrorListener (node:_http_client:502:9) at TLSSocket.emit (node:events:513:28) at emitErrorNT (node:internal/streams/destroy:151:8) at emitErrorCloseNT (node:internal/streams/destroy:116:3) at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

这个错我没报了。你报可能是因为没配置好代理,可以参考我写的这个:https://github.com/yi03/koishi-plugin-openai-api#%E4%BB%A3%E7%90%86%E9%85%8D%E7%BD%AE

Haku530 commented 1 year ago

我的两个bug没有修复,不知道其他人怎么样 2023-03-07 07:36:00 [W] session 你好 TypeError: Cannot read properties of undefined (reading 'get') at Cache.get (C:\deve\dev\node_modules@tomlbz\koishi-plugin-openai\lib\cache.js:47:28) at C:\deve\dev\node_modules@tomlbz\koishi-plugin-openai\lib\index.js:65:20 at next (C:\deve\dev\node_modules@koishijs\core\lib\index.cjs:853:69) at C:\deve\dev\node_modules\koishi-plugin-davinci-003\lib\index.js:124:20 at next (C:\deve\dev\node_modules@koishijs\core\lib\index.cjs:853:69) at C:\deve\dev\node_modules@koishijs\core\lib\index.cjs:1814:14 at next (C:\deve\dev\node_modules@koishijs\core\lib\index.cjs:853:69) at C:\deve\dev\node_modules@koishijs\core\lib\index.cjs:1803:16 at next (C:\deve\dev\node_modules@koishijs\core\lib\index.cjs:853:69) at Processor._process (C:\deve\dev\node_modules@koishijs\core\lib\index.cjs:832:12) 2023-03-07 07:36:09 [W] app Error: connect ETIMEDOUT 157.240.13.8:443 at AxiosError.from (C:\deve\dev\node_modules\axios\dist\node\axios.cjs:725:14) at RedirectableRequest.handleRequestError (C:\deve\dev\node_modules\axios\dist\node\axios.cjs:2467:25) at RedirectableRequest.emit (node:events:513:28) at eventHandlers. (C:\deve\dev\node_modules\follow-redirects\index.js:14:24) at ClientRequest.emit (node:events:513:28) at TLSSocket.socketErrorListener (node:_http_client:502:9) at TLSSocket.emit (node:events:513:28) at emitErrorNT (node:internal/streams/destroy:151:8) at emitErrorCloseNT (node:internal/streams/destroy:116:3) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) 2023-03-07 07:36:14 [I] app unload plugin @tomlbz/openai:8qumb9 2023-03-07 07:36:17 [I] app apply plugin @tomlbz/openai:8qumb9 2023-03-07 07:36:34 [W] session 魔理沙你好 TypeError: this._names is not iterable at Eye._mentionedName (C:\deve\dev\node_modules@tomlbz\koishi-plugin-openai\lib\eye.js:29:33) at Eye.readInput (C:\deve\dev\node_modules@tomlbz\koishi-plugin-openai\lib\eye.js:40:22) at C:\deve\dev\node_modules@tomlbz\koishi-plugin-openai\lib\index.js:61:27 at next (C:\deve\dev\node_modules@koishijs\core\lib\index.cjs:853:69) at C:\deve\dev\node_modules\koishi-plugin-marry\lib\index.js:46:16 at next (C:\deve\dev\node_modules@koishijs\core\lib\index.cjs:853:69) at C:\deve\dev\node_modules\koishi-plugin-davinci-003\lib\index.js:124:20 at next (C:\deve\dev\node_modules@koishijs\core\lib\index.cjs:853:69) at C:\deve\dev\node_modules@koishijs\core\lib\index.cjs:1809:16 at next (C:\deve\dev\node_modules@koishijs\core\lib\index.cjs:853:69) 2023-03-07 07:36:39 [W] app Error: connect ETIMEDOUT 157.240.13.8:443 at AxiosError.from (C:\deve\dev\node_modules\axios\dist\node\axios.cjs:725:14) at RedirectableRequest.handleRequestError (C:\deve\dev\node_modules\axios\dist\node\axios.cjs:2467:25) at RedirectableRequest.emit (node:events:513:28) at eventHandlers. (C:\deve\dev\node_modules\follow-redirects\index.js:14:24) at ClientRequest.emit (node:events:513:28) at TLSSocket.socketErrorListener (node:_http_client:502:9) at TLSSocket.emit (node:events:513:28) at emitErrorNT (node:internal/streams/destroy:151:8) at emitErrorCloseNT (node:internal/streams/destroy:116:3) at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

这个错我没报了。你报可能是因为没配置好代理,可以参考我写的这个:https://github.com/yi03/koishi-plugin-openai-api#%E4%BB%A3%E7%90%86%E9%85%8D%E7%BD%AE

感谢,我现在可以使用插件了,但新增的两个功能不知道为何暂时无法正常用,bot不能计算数学问题和回答今天日期这样的问题

yi03 commented 1 year ago

同问。我现在虽然能用了,填了WolframAlpha AppId,浏览器能访问谷歌搜索,但是问了几个问题还是不确定到底有没有调用搜索。想知道如果有调用搜索的话会提示什么。

TomLBZ commented 1 year ago

~我没再报之前的错了,改报这个错了。~ 换了个节点后好了,现在能用了。

2023-03-07 08:43:36 [I] @tomlbz/openai/soul/search Knowledge Mode: none
2023-03-07 08:43:37 [I] @tomlbz/openai/ai Chat model: gpt-3.5-turbo
2023-03-07 08:43:37 [I] @tomlbz/openai/eye Keywords: none
2023-03-07 08:43:38 [W] session <at id="1378309923"/> 你好
                        AxiosError: Request failed with status code 502
                            at settle (C:\Users\allegray\koishi-bot\koishi-app6\node_modules\axios\dist\node\axios.cjs:1268:12)
                            at IncomingMessage.handleStreamEnd (C:\Users\allegray\koishi-bot\koishi-app6\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-07 08:43:38 [I] @tomlbz/openai/eye Keywords: none
2023-03-07 08:43:38 [W] session <at id="1378309923"/> hi
                        AxiosError: Request failed with status code 502
                            at settle (C:\Users\allegray\koishi-bot\koishi-app6\node_modules\axios\dist\node\axios.cjs:1268:12)
                            at IncomingMessage.handleStreamEnd (C:\Users\allegray\koishi-bot\koishi-app6\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)

@yi03 请问这俩错现在还有吗?

yi03 commented 1 year ago

~我没再报之前的错了,改报这个错了。~ 换了个节点后好了,现在能用了。

2023-03-07 08:43:36 [I] @tomlbz/openai/soul/search Knowledge Mode: none
2023-03-07 08:43:37 [I] @tomlbz/openai/ai Chat model: gpt-3.5-turbo
2023-03-07 08:43:37 [I] @tomlbz/openai/eye Keywords: none
2023-03-07 08:43:38 [W] session <at id="1378309923"/> 你好
                        AxiosError: Request failed with status code 502
                            at settle (C:\Users\allegray\koishi-bot\koishi-app6\node_modules\axios\dist\node\axios.cjs:1268:12)
                            at IncomingMessage.handleStreamEnd (C:\Users\allegray\koishi-bot\koishi-app6\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-07 08:43:38 [I] @tomlbz/openai/eye Keywords: none
2023-03-07 08:43:38 [W] session <at id="1378309923"/> hi
                        AxiosError: Request failed with status code 502
                            at settle (C:\Users\allegray\koishi-bot\koishi-app6\node_modules\axios\dist\node\axios.cjs:1268:12)
                            at IncomingMessage.handleStreamEnd (C:\Users\allegray\koishi-bot\koishi-app6\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)

@yi03 请问这俩错现在还有吗?

没有了,换了个节点就好了。

Haku530 commented 1 year ago

同问。我现在虽然能用了,填了WolframAlpha AppId,浏览器能访问谷歌搜索,但是问了几个问题还是不确定到底有没有调用搜索。想知道如果有调用搜索的话会提示什么。

试试问今天几号,3的55次方等于多少,看能否正确回答

TomLBZ commented 1 year ago

同问。我现在虽然能用了,填了WolframAlpha AppId,浏览器能访问谷歌搜索,但是问了几个问题还是不确定到底有没有调用搜索。想知道如果有调用搜索的话会提示什么。

正在添加一个明显的提示。过会儿更新。

yi03 commented 1 year ago

话说还有个小问题就是,创建pinecone的Indexes的时候有些值不知道该填什么。我Dimensions填的768,Metric选的cosine,Pod Type选的P2,没创建Collections。好像是能用了,不知道我这填的有没有问题。

TomLBZ commented 1 year ago

话说还有个小问题就是,创建pinecone的Indexes的时候有些值不知道该填什么。我Dimensions填的768,Metric选的cosine,Pod Type选的P2,没创建Collections。好像是能用了,不知道我这填的有没有问题。

Dimensions需要填1536,因为OpenAIEmbeddings长度为1536。否则未来计算向量的距离时容易出大问题。相似度算法默认的Cosine即可。

TomLBZ commented 1 year ago

同问。我现在虽然能用了,填了WolframAlpha AppId,浏览器能访问谷歌搜索,但是问了几个问题还是不确定到底有没有调用搜索。想知道如果有调用搜索的话会提示什么。

@yi03 @Haku530

一些输出参考 正确调用WolframAlpha计算推理的情形 image 在搜索引擎上抓取的情形 image 注意,这里的“Keywords”根据每个人的向量数据库不同都会有所不同。要关注的是Knowledge那条信息。

Pafffffff commented 1 year ago

2023-03-07 10:51:49 [I] @tomlbz/openai/eye name called, 1456326316: @凌音 你觉得我的话有什么问题? 2023-03-07 10:51:49 [I] @tomlbz/openai/soul/search Knowledge Mode: google 2023-03-07 10:52:06 [I] @tomlbz/openai/ai Chat model: gpt-3.5-turbo 2023-03-07 10:52:09 [I] @tomlbz/openai/eye Keywords: none 2023-03-07 10:52:09 [I] @tomlbz/openai/eye Knowledge: 不一定可靠的网络信息:[�ܤ_龙��对�⭵�A剧��说���O没��爱�u���\���A��剧���X来���ĪG��爱无��G�����A�A�A�]���ڡA�O�ڪ������C���]为��们��场对�ߡA��对�A����却����爱�C] 2023-03-07 10:52:09 [I] @tomlbz/openai/ai Chat model: gpt-3.5-turbo 2023-03-07 10:52:14 [I] @tomlbz/openai/cache Saving cache... 2023-03-07 10:52:14 [I] @tomlbz/openai/ai Chat model: gpt-3.5-turbo 2023-03-07 10:52:16 [I] @tomlbz/openai/eye Keywords: none 2023-03-07 10:55:05 [I] @tomlbz/openai/eye appelled, 1456326316: how are you 2023-03-07 10:55:05 [I] @tomlbz/openai/soul/search Knowledge Mode: google 2023-03-07 10:55:10 [I] @tomlbz/openai/ai Chat model: gpt-3.5-turbo 2023-03-07 10:55:11 [I] @tomlbz/openai/eye Keywords: none 2023-03-07 10:55:11 [I] @tomlbz/openai/eye Knowledge: 不一定可靠的网络信息:[Let's sing about our feelings in this fun and popular Dream English Song. Original Song by Matt ...Duration: Posted: ] 2023-03-07 10:55:11 [I] @tomlbz/openai/ai Chat model: gpt-3.5-turbo 2023-03-07 10:55:18 [I] @tomlbz/openai/ai Chat model: gpt-3.5-turbo 2023-03-07 10:55:20 [I] @tomlbz/openai/eye Keywords: 信息,网络

用中文聊天似乎会导致搜索乱码,且机器人回复“我不明白你的意思”。用英文可以正确搜索,但搜索信息后面会跟一些杂乱信息,且机器人回复“我很好,但你的话后面跟了一些奇怪的信息”。 我没有使用bing翻译api,要用api应该要注册Azure账户,这需要visa卡,对国内部分用户来说有些困难。

TomLBZ commented 1 year ago

2023-03-07 10:51:49 [I] @tomlbz/openai/eye name called, 1456326316: @凌音 你觉得我的话有什么问题? 2023-03-07 10:51:49 [I] @tomlbz/openai/soul/search Knowledge Mode: google 2023-03-07 10:52:06 [I] @tomlbz/openai/ai Chat model: gpt-3.5-turbo 2023-03-07 10:52:09 [I] @tomlbz/openai/eye Keywords: none 2023-03-07 10:52:09 [I] @tomlbz/openai/eye Knowledge: 不一定可靠的网络信息:[�ܤ_龙��对�⭵�A剧��说���O没��爱�u���\���A��剧���X来���ĪG��爱无��G�����A�A�A�]���ڡA�O�ڪ������C���]为��们��场对�ߡA��对�A����却����爱�C] 2023-03-07 10:52:09 [I] @tomlbz/openai/ai Chat model: gpt-3.5-turbo 2023-03-07 10:52:14 [I] @tomlbz/openai/cache Saving cache... 2023-03-07 10:52:14 [I] @tomlbz/openai/ai Chat model: gpt-3.5-turbo 2023-03-07 10:52:16 [I] @tomlbz/openai/eye Keywords: none 2023-03-07 10:55:05 [I] @tomlbz/openai/eye appelled, 1456326316: how are you 2023-03-07 10:55:05 [I] @tomlbz/openai/soul/search Knowledge Mode: google 2023-03-07 10:55:10 [I] @tomlbz/openai/ai Chat model: gpt-3.5-turbo 2023-03-07 10:55:11 [I] @tomlbz/openai/eye Keywords: none 2023-03-07 10:55:11 [I] @tomlbz/openai/eye Knowledge: 不一定可靠的网络信息:[Let's sing about our feelings in this fun and popular Dream English Song. Original Song by Matt ...Duration: Posted: ] 2023-03-07 10:55:11 [I] @tomlbz/openai/ai Chat model: gpt-3.5-turbo 2023-03-07 10:55:18 [I] @tomlbz/openai/ai Chat model: gpt-3.5-turbo 2023-03-07 10:55:20 [I] @tomlbz/openai/eye Keywords: 信息,网络

用中文聊天似乎会导致搜索乱码,且机器人回复“我不明白你的意思”。用英文可以正确搜索,但搜索信息后面会跟一些杂乱信息,且机器人回复“我很好,但你的话后面跟了一些奇怪的信息”。 我没有使用bing翻译api,要用api应该要注册Azure账户,这需要visa卡,对国内部分用户来说有些困难。

@Pafffffff 移步 #23