fix: 调整claude无响应重试时间

This commit is contained in:
ikechan8370 2023-04-20 13:37:42 +08:00
parent a3ef75cdcc
commit 7f773dcfc4

View file

@ -107,8 +107,8 @@ export class SlackClaudeClient {
}
await delay(2000)
tryTimes++
if (tryTimes > 10 && response === '_Typing…_') {
// 过了5秒还没任何回复,就重新发一下试试
if (tryTimes > 3 && response === '_Typing…_') {
// 过了6秒还没任何回复,就重新发一下试试
logger.warn('claude没有响应重试中')
return await this.sendMessage(prompt, e, t + 1)
}
@ -154,8 +154,8 @@ export class SlackClaudeClient {
}
await delay(2000)
tryTimes++
if (tryTimes > 10 && response === '_Typing…_') {
// 过了5秒还没任何回复,就重新发一下试试
if (tryTimes > 3 && response === '_Typing…_') {
// 过了6秒还没任何回复,就重新发一下试试
logger.warn('claude没有响应重试中')
return await this.sendMessage(prompt, e, t + 1)
}