tisfeng / Easydict

一个简洁优雅的词典翻译 macOS App。开箱即用,支持离线 OCR 识别,支持有道词典,🍎 苹果系统词典,🍎 苹果系统翻译,OpenAI,Gemini,DeepL,Google,Bing,腾讯,百度,阿里,小牛,彩云和火山翻译。A concise and elegant Dictionary and Translator macOS App for looking up words and translating text.
GNU General Public License v3.0
6.45k stars 328 forks source link

🚀 功能建议:允许添加多个自定义 OpenAI 服务 #479

Open tisfeng opened 3 months ago

tisfeng commented 3 months ago

请先确认以下事项

功能描述

目前最新 dev 已添加了一个自定义 OpenAI 服务,但用户可能想要添加多个自定义服务 https://github.com/tisfeng/Easydict/issues/439#issuecomment-1977974655https://github.com/tisfeng/Easydict/issues/434

因此,我们可以在已有的自定义 OpenAI 服务功能上进行改进,例如在设置服务页添加一个【复制】按钮,点击后创建一个新的自定义 OpenAI 服务。

image

使用场景

*

实现方案(可选)

No response

是否愿意提交 PR 实现该功能

tisfeng commented 1 month ago

@phlpsong 这个功能开始做了么,如果还没有的话,可以构思一下如何配合 https://github.com/tisfeng/Easydict/issues/551 一起做。

目前加载服务代码都是固定好的,一个类对应一个服务,对于添加多个自定义 OpenAI 这种服务来说不方便,而使用 SwiftUI 重写查询窗口时,这部分代码逻辑可能会大改,因此最好配合起来实现。

phlpsong commented 1 month ago

Sorry about that, I've been quite busy with work lately, so I might have to wait until mid of next month to take a look.

tisfeng commented 1 month ago

ok,你先忙,我们先等 https://github.com/tisfeng/Easydict/issues/551 搭个架子,可能也没那么快。


我在想,如果服务配置 UI 这部分代码实现得比较好的话,稍后是否可以像 Raycast 一样使用配置文件实现服务界面配置,最后实现 js 自定义扩展服务 https://github.com/tisfeng/Easydict/issues/136 。 这个还有点遥远,先一步步来吧。

valens7 commented 1 month ago

奇怪,在最新的版本里找不到自定义OPEN AI服务呢

image
tisfeng commented 1 month ago

@valens7 之前的回复你没看到吗 https://github.com/tisfeng/Easydict/issues/536#issuecomment-2132194072