修改异常报错

This commit is contained in:
Yanyutin753
2024-02-18 09:57:08 +08:00
parent 91f8612520
commit cc6b5fbd73
2 changed files with 2 additions and 2 deletions

View File

@@ -720,7 +720,7 @@ public class chatController {
if (resp.code() == 429) {
return new ResponseEntity<>(Result.error("rate limit exceeded"), HttpStatus.TOO_MANY_REQUESTS);
} else {
String token = getSelfToken(apiKey);
String token = getCopilotToken(apiKey);
if (token == null) {
return new ResponseEntity<>(Result.error("Github Copilot APIKey is wrong"), HttpStatus.UNAUTHORIZED);
}
@@ -891,7 +891,7 @@ public class chatController {
if (resp.code() == 429) {
return new ResponseEntity<>(Result.error("rate limit exceeded"), HttpStatus.TOO_MANY_REQUESTS);
} else {
String token = getCoCoToken(apiKey);
String token = getSelfToken(apiKey);
if (token == null) {
return new ResponseEntity<>(Result.error("自定义 APIKey is wrong"), HttpStatus.UNAUTHORIZED);
}

Binary file not shown.