fix: change retry times for API2 from 5 to 1

This commit is contained in:
ikechan8370 2023-02-14 00:14:20 +08:00
parent 12290ad8e4
commit 1e918a57fe

View file

@ -364,7 +364,7 @@ export class chatgpt extends plugin {
}
// console.log(accessToken)
this.chatGPTApi = new ChatGPTClient(accessToken, clientOptions, cacheOptions)
let response = await tryTimes(async () => await this.chatGPTApi.sendMessage(prompt, conversation || {}), 5)
let response = await tryTimes(async () => await this.chatGPTApi.sendMessage(prompt, conversation || {}), 1)
return {
text: response.response,
conversationId: response.conversationId,