火山方舟文档地址:https://www.volcengine.com/docs/82379/1263482
接入步骤
- 用户前往火山方舟的模型推理页面创建推理接入点,调用API时通过设置model=ep-xxxxxxxxxx-yyyy进行调用。
- 官方推荐火山IAM授权 (推荐),文档地址https://www.volcengine.com/docs/82379/1263279
- 获取到access_key和secret_key之后,就可以开始填入到config.json了
simple-one-api
对应的配置文件示例:
{
"server_port": ":9099",
"load_balancing": "random",
"services": {
"huoshan": [
{
"models": ["ep-20240612090709-hzjz5"],
"enabled": true,
"credentials": {
"access_key": "xxx",
"secret_key": "xxx"
},
"server_url":"https://ark.cn-beijing.volces.com/api/v3"
}
]
}
}
设置模型别名
如果需要设置对外的模型名称,可以设置参数model_map
,从而起到别名作用;
例如这里ep-20240612090709-hzjz5
别名为doubao32k
,从而在调用simple-one-api
的时候传入doubao32k
即可;
simple-one-api
对应的配置文件示例:
```json
{
"server_port": ":9099",
"load_balancing": "random",
"services": {
"huoshan": [
{
"models": ["doubao32k"],
"enabled": true,
"credentials": {
"access_key": "xxx",
"secret_key": "xxx"
},
"model_map":{
"doubao32k": "ep-20240612090709-hzjz5"
},
"server_url":"https://ark.cn-beijing.volces.com/api/v3"
}
]
}
}