tisfeng / Raycast-Easydict

A Raycast Extension for looking up words or translating text in an easy way. Support 48+ languages, support Linguee and Youdao dictionary, support OpenAI, DeepL, Google, Bing, Apple, Baidu, Tencent, Volcano, Youdao and Caiyun translation.
https://www.raycast.com/isfeng/easydict
MIT License
382 stars 21 forks source link

使用 EasyDict 直接 crash #35

Closed simowce closed 1 year ago

simowce commented 1 year ago

描述问题

使用 Raycast 翻译,会直接报错:

image

x2: The operation was aborted.

c:index.js:70:17 AbortSignal.m:easydict.js:162:17318

AbortSignal.dispatchEvent:event_target:673:26

复现步骤

设置快捷键为 zms,然后查询任意单词即可复现

期望的结果

不报错

运行环境

macOS 13.1

github-actions[bot] commented 1 year ago

Hello simowce, Thank you for your first issue contribution 🎉

tisfeng commented 1 year ago

你好,你电脑有设置系统代理吗?最近加了 OpenAI 翻译,但这个需要走特殊代理,香港之类的 IP 都不行,我好像忘了做连接防护,导致可能崩溃 😢

ccbikai commented 1 year ago

你好,你电脑有设置系统代理吗?最近加了 OpenAI 翻译,但这个需要走特殊代理,香港之类的 IP 都不行,我好像忘了做连接防护,导致可能崩溃 😢

ma: request to https://api.openai.com/v1/chat/completions failed, reason: Client network socket disconnected before secure TLS connection was established

ClientRequest.:index.js:108:10 ClientRequest.emit:node:events:525:35 ClientRequest.emit:node:domain:489:12 TLSSocket.socketErrorListener:node:_http_client:494:9

ccbikai commented 1 year ago

的确是连接 OpenAI 出错的问题。 但是我没有打开 OpenAI 。

还有是否可以支持自定义 OpenAI API 地址?

tisfeng commented 1 year ago

你到设置页看看,这个值默认是开启的,稍后我改一下。

暂时不支持自定义 OpenAI API,我还没搞到可测试的 API,后面再看看。

tisfeng commented 1 year ago

修复优化了一下,你用仓库最新的代码跑一下看看 😤

tisfeng commented 1 year ago

商店 PR 也已经合并了 https://github.com/raycast/extensions/pull/5615 ,请测试一下。

ccbikai commented 1 year ago

目前可以正常使用了