mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-10-17 08:38:24 +00:00
chore: update test logic
This commit is contained in:
@@ -56,7 +56,7 @@ func testChannel(channel *model.Channel, request *ChatRequest) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if response.Error.Message != "" || response.Error.Code != "" {
|
||||
if response.Usage.CompletionTokens == 0 {
|
||||
return errors.New(fmt.Sprintf("type %s, code %s, message %s", response.Error.Type, response.Error.Code, response.Error.Message))
|
||||
}
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user