瀏覽代碼

chore: update test logic

JustSong 2 年之前
父節點
當前提交
9301b3fed3
共有 1 個文件被更改,包括 1 次插入1 次删除
  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