songquanpeng / one-api

OpenAI 接口管理 & 分发系统,支持 Azure、Anthropic Claude、Google PaLM 2 & Gemini、智谱 ChatGLM、百度文心一言、讯飞星火认知、阿里通义千问、360 智脑以及腾讯混元,可用于二次分发管理 key,仅单可执行文件,已打包好 Docker 镜像,一键部署,开箱即用. OpenAI key management & redistribution system, using a single API for all LLMs, and features an English UI.
https://openai.justsong.cn/
MIT License
16.19k stars 3.74k forks source link

One API 正在重构中 #975

Open songquanpeng opened 5 months ago

songquanpeng commented 5 months ago

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

songquanpeng commented 5 months ago

相关 PR & commit:

  1. https://github.com/songquanpeng/one-api/pull/935
  2. https://github.com/songquanpeng/one-api/pull/957
  3. https://github.com/songquanpeng/one-api/commit/b9d3cb0c4520fd42bdae085b98af76d369527cf1
songquanpeng commented 5 months ago

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

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

suwubee commented 5 months ago

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

libingtong commented 5 months ago

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

sfdzkj commented 5 months ago

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

WumaCoder commented 5 months ago

相关 PR & commit:

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

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

uuu555552 commented 4 months ago

建议支持支付功能。

songquanpeng commented 4 months ago

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