add: support replicate

This commit is contained in:
2024-01-23 15:20:22 +08:00
parent 1fc17daa35
commit b1a9d6b685
5 changed files with 461 additions and 5 deletions

View File

@@ -11,10 +11,13 @@ dbaddr: ./db.sqlite
upstreams:
- sk: "secret_key_1"
endpoint: "https://api.openai.com/v2"
allow: ["gpt-3.5-trubo"] # 可选的模型白名单
allow: ["gpt-3.5-trubo"] # 可选的模型白名单
- sk: "secret_key_2"
endpoint: "https://api.openai.com/v1"
timeout: 30
allow: ["gpt-3.5-trubo"] # 可选的模型白名单
deny: ["gpt-4"] # 可选的模型黑名单
# 若白名单和黑名单同时设置,先判断白名单,再判断黑名单
# 若白名单和黑名单同时设置,先判断白名单,再判断黑名单
- sk: "key_for_replicate"
type: replicate
allow: ["mistralai/mixtral-8x7b-instruct-v0.1"]