Explorar o código

chore: update test logic

JustSong %!s(int64=2) %!d(string=hai) anos
pai
achega
9301b3fed3
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      controller/channel-test.go

+ 1 - 1
controller/channel-test.go

@@ -56,7 +56,7 @@ func testChannel(channel *model.Channel, request *ChatRequest) error {
 	if err != nil {
 	if err != nil {
 		return err
 		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 errors.New(fmt.Sprintf("type %s, code %s, message %s", response.Error.Type, response.Error.Code, response.Error.Message))
 	}
 	}
 	return nil
 	return nil