Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: 可以自己add不限数量的custom API,可以是OpenAI兼容的API #102

Open
saccohuo opened this issue Mar 31, 2024 · 5 comments

Comments

@saccohuo
Copy link

image

@fishjar
Copy link
Owner

fishjar commented Apr 1, 2024

其实我之前也有过想加这个功能,不过代码上有点麻烦就没继续了,我再研究下。

@fishjar
Copy link
Owner

fishjar commented Apr 1, 2024

还真的是有点麻烦,之前设计时没考虑好,翻译接口列表定义成一个Object而不是Array,改变数据结构的话会造成现有用户配置丢失问题。
考虑了下,暂采用简单的方案,就是增加多个预设的custom,比如5个,对绝大部分用户来说应该够用吧。

@saccohuo
Copy link
Author

saccohuo commented Apr 4, 2024

还真的是有点麻烦,之前设计时没考虑好,翻译接口列表定义成一个Object而不是Array,改变数据结构的话会造成现有用户配置丢失问题。 考虑了下,暂采用简单的方案,就是增加多个预设的custom,比如5个,对绝大部分用户来说应该够用吧。

非常感谢,临时方案这样会好很多了。更长远如果能有机会支持,就更好了。

@saccohuo
Copy link
Author

saccohuo commented Apr 4, 2024

还真的是有点麻烦,之前设计时没考虑好,翻译接口列表定义成一个Object而不是Array,改变数据结构的话会造成现有用户配置丢失问题。 考虑了下,暂采用简单的方案,就是增加多个预设的custom,比如5个,对绝大部分用户来说应该够用吧。

请问能否设置API是不是兼容OpenAI API而且可以自定义Model,我在custom中自定义了Groq的接口,但是不是通过OpenAI API兼容的方式调用的,提示如下:

{
  "url": "https://kiss-translator/translate?fromLang=en&text=hello%20world&toLang=zh-CN&translator=Custom&version=1.8",
  "status": 404,
  "response": {
    "error": {
      "message": "Unknown request URL: POST /openai/v1. Please check the URL for typos, or see the docs at https://console.groq.com/docs/",
      "type": "invalid_request_error",
      "code": "unknown_url"
    }
  }
}

@fishjar
Copy link
Owner

fishjar commented Apr 15, 2024

openai的接口不能在custom中设置,你可以直接填写到openai的配置中。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants