Prechádzať zdrojové kódy

chore: update test logic

JustSong 2 rokov pred
rodič
commit
2ab8dac764
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  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 {
 		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