generated from songquanpeng/gin-template
-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
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
区别对待接口返回的错误,选择性禁用 #90
Labels
Comments
songquanpeng
added
enhancement
New feature or request
priority
This will have high priority.
bug
Something isn't working
and removed
enhancement
New feature or request
labels
May 18, 2023
我记得这个是默认关闭的哈,难道你那里是默认开启的吗?如果是的话这就是另外的 bug 了。 |
songquanpeng
added
enhancement
New feature or request
and removed
bug
Something isn't working
labels
May 18, 2023
是我打开的,我以为这个选项是用来在渠道“测试所有已开启通道”的时候,自动禁用失败的渠道,可能是我理解错了~~ |
那个默认就开启禁用哈。确实描述不够清楚,之后我改一下。 |
我比较好奇,如果是 stream 模式,OpenAI 的错误相应是什么格式的? |
是一样的格式,他貌似并不会在 stream 的返回过程中报错。 |
已修复,已推送 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
测试发现,当自定义的openai接口返回 Rate Limit 和 The model:
gpt-4
does not exist 的错误时, 都会把该条渠道自动禁用。这两种报错是普遍的(免费的APIKEY频率限制一分钟3次,用户选错模型等),并非渠道不能用,不应该自动禁用掉渠道。这会导致后面把所有渠道都自动禁用掉了。{
"error": {
"message": "type invalid_request_error, code model_not_found, message The model:
gpt-4
does not exist","type": "one_api_error"
}
}
另外能否把openai响应的状态码也暴露出来,现在即使openai接口返回429、401之类的HTTP响应码,one-api返回的都是200响应码。
The text was updated successfully, but these errors were encountered: