fruitbars / simple-one-api

OpenAI 接口接入适配,支持千帆大模型平台、讯飞星火大模型、腾讯混元以及MiniMax、Deep-Seek,等兼容OpenAI接口,仅单可执行文件,配置超级简单,一键部署,开箱即用. Seamlessly integrate with OpenAI and compatible APIs using a single executable for quick setup and deployment.
841 stars 73 forks source link

支持设置一个总api_key #2

Closed XYZliang closed 1 month ago

XYZliang commented 1 month ago

因为各自服务都写在了配置里,放在有公网的服务器上多少还是不安心,如果能设置一个总的api_key,只有对了才能访问服务的话感觉会好一些(后面我有空的话我会试着修改并push 过来,就是不熟悉 go,不过这么小一个功能点试一下也能弄出来)

fruitbars commented 1 month ago

更新支持了

{
    "api_key":"123456"
    "load_balancing": "random",
    "xinghuo": [
      {
        "models": ["spark-lite"],
        "enabled": true,
        "credentials": {
          "appid": "xxx",
          "api_key": "xxx",
          "api_secret": "xxx"
        }
      }
    ]
}