We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
在simple-one-api代理百度千帆、讯飞星火、Google gemini和CF 的AI,每次访问都会随机到上述AI的一种,有没有方法能通过URL指定所使用的后台AI ?我查找过文档,指定过models,但没用。
{ "log_level": "prod", "server_port": ":9090", "api_key": "sk-dfKrzhtPruv4OQDG********c4dDdAbF0", "load_balancing": "random", "proxy": {}, "services": { "qianfan": [ { "models": ["ERNIE-Lite-8K"], "enabled": true, "model_map": { "baidu": "ERNIE-Lite-8K" }, "model_redirect": { "gpt-3.5-turbo": "ERNIE-Lite-8K" }, "limit": { "qps": 300 }, "credentials": { "api_key": "lku54*****NseB", "secret_key": "IG*****mXzfo" } } ], "xinghuo": [ { "models": ["spark-lite"], "enabled": true, "model_map": { "xinghuo": "spark-lite" }, "model_redirect": { "gpt-3.5-turbo": "spark-lite" }, "limit": {}, "credentials": { "appid": "866*****", "api_key": "a6******c8a5", "api_secret": "N******M0" } } ], "openai": [ { "models": ["@cf/meta/llama-3-8b-instruct"], "enabled": true, "model_map": { "cf": "@cf/meta/llama-3-8b-instruct" }, "model_redirect": { "gpt-3.5-turbo": "@cf/meta/llama-3-8b-instruct" }, "limit": {}, "credentials": { "api_key": "gEbUL******ZKxL" }, "server_url": "https://api.cloudflare.com/client/v4/accounts/7d********138/ai/v1" } ], "gemini": [ { "models": ["gemini-1.5-flash"], "enabled": true, "model_map": { "google": "gemini-1.5-flash" }, "model_redirect": { "gpt-3.5-turbo": "gemini-1.5-flash" }, "limit": { "qps": 15 }, "credentials": { "api_key": "AI******Os" } } ] } }
http://104.3*6.4*7.2*4:19090/v1/google http://104.3*6.4*7.2*4:19090/v1/baidu http://104.3*6.4*7.2*4:19090/v1/gemini-1.5-flash
以上连接都无法指定后端所使用的Ai模型 我该如何做?
The text was updated successfully, but these errors were encountered:
?
启用哪个模型是由你的客户端决定的
Sorry, something went wrong.
模型是由消息中的model来决定的。可以参考下openai的文档https://platform.openai.com/docs/guides/text-generation
curl https://api.openai.com/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer $OPENAI_API_KEY" -d '{ "model": "gpt-4o", "messages": [ {"role": "user", "content": "write a haiku about ai"} ] }'
@fruitbars @lopins 我希望simple-one-api可以像one-api那样指定simple-one-api所运行的后端AI,例如one-api密钥为sk-dfKrzhtPruv4OQDG********c4dDdAbF0,则sk-dfKrzhtPruv4OQDG********c4dDdAbF0-1为Google ai,sk-dfKrzhtPruv4OQDG********c4dDdAbF0-2为百度AI,我以为simple-one-api也可以使用类似的功能,只是要在URL中指定。
sk-dfKrzhtPruv4OQDG********c4dDdAbF0
sk-dfKrzhtPruv4OQDG********c4dDdAbF0-1
sk-dfKrzhtPruv4OQDG********c4dDdAbF0-2
fruitbars
No branches or pull requests
遇到的问题
在simple-one-api代理百度千帆、讯飞星火、Google gemini和CF 的AI,每次访问都会随机到上述AI的一种,有没有方法能通过URL指定所使用的后台AI ?我查找过文档,指定过models,但没用。
config.json
测试的连接
http://104.3*6.4*7.2*4:19090/v1/google
http://104.3*6.4*7.2*4:19090/v1/baidu
http://104.3*6.4*7.2*4:19090/v1/gemini-1.5-flash
以上连接都无法指定后端所使用的Ai模型
我该如何做?
The text was updated successfully, but these errors were encountered: