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

One API 正在重构中 #975

Open
songquanpeng opened this issue Jan 28, 2024 · 8 comments
Open

One API 正在重构中 #975

songquanpeng opened this issue Jan 28, 2024 · 8 comments
Labels
enhancement New feature or request

Comments

@songquanpeng
Copy link
Owner

songquanpeng commented Jan 28, 2024

重构完成后会解决什么问题?

  • 现有的重试是通过跳转完成的,非内部重试;
  • 计费逻辑与 relay 逻辑耦合,不支持按次数计费;
  • relay 逻辑与渠道相关的逻辑严重耦合,难以适配新的渠道类型;
  • 非 OpenAI 类型的渠道测试功能缺失;
  • image、text & audio 存在大量的重复代码,这使得适配更新吃力;
  • relay 功能没有细粒度拆分,导致难以进行单测;
  • 无法作为 Golang 库使用,不利于配套程序的编写;
@songquanpeng songquanpeng added the enhancement New feature or request label Jan 28, 2024
@songquanpeng songquanpeng pinned this issue Jan 28, 2024
@songquanpeng
Copy link
Owner Author

songquanpeng commented Jan 28, 2024

@songquanpeng
Copy link
Owner Author

songquanpeng commented Jan 28, 2024

诚然,重构并非一朝一夕能够完成的事情,个人只能投入周末时间处理,在此期间对其他非紧急问题的响应会有延迟,也请各位理解,心有余而力不足。

重构是为了之后能更快地响应功能请求与 issue 处理,也是为了方便其他开发者能更容易地提交 PR,为了项目能更健康地发展,所以我理解这是一件必须要做的事情。

@suwubee
Copy link

suwubee commented Jan 28, 2024

建议
1,在可用模型对应的模型边上加上倍率或者单价,省去做价格表的功夫。
2,既然存在非标openai模型,与其一个个去手动匹配,不如做一个万能模型,自定义接入json所匹配的字段,以及中转出去的json格式,定价可以暂时粗放一些,之前在 #873 提过。

@libingtong
Copy link

太好了,建议增强回退、自动重试和负载均衡的能力。可以参考:https://github.com/Portkey-AI/gateway

@sfdzkj
Copy link

sfdzkj commented Jan 31, 2024

希望支持 https://xinghuo.xfyun.cn/botcenter 讯飞助手, 他和讯飞星火格式一直,唯一区别是接口地址变化。优势是助手可以随意创建,每个助手有10000000 token,可以自定义数据集。这样可以通过创建助手白嫖

@WumaCoder
Copy link

相关 PR & commit:

  1. refactor: refactor relay part #935
  2. refactor: refactor relay part #957
  3. b9d3cb0

能否使用 ts 开发系统呢,这样更多的开发者可以协助

@uuu555552
Copy link

建议支持支付功能。

@songquanpeng
Copy link
Owner Author

Hi 各位,relay 部分已经基本重构完成,在此基础上会继续更新解决之前遗留的问题。

@songquanpeng songquanpeng unpinned this issue Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants