Fix RetryTemplate retry condition

Resolves #846
This commit is contained in:
Youngrae Cho
2024-07-18 21:11:21 +09:00
committed by Christian Tzolov
parent 41d2cb5827
commit 75db25b13d

View File

@@ -53,7 +53,7 @@ public class SpringAiRetryAutoConfiguration {
public RetryTemplate retryTemplate(SpringAiRetryProperties properties) {
return RetryTemplate.builder()
.maxAttempts(properties.getMaxAttempts())
.retryOn(NonTransientAiException.class)
.retryOn(TransientAiException.class)
.exponentialBackoff(properties.getBackoff().getInitialInterval(), properties.getBackoff().getMultiplier(),
properties.getBackoff().getMaxInterval())
.withListener(new RetryListener() {