fix https://github.com/spring-projects/spring-ai/issues/1622
Comment From: markpollack
This condition will always be true. In the issue described it looks to be a matter of providing the spring retry library into the project. It is defined in spring-ai-openai
module
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-retry</artifactId>
<version>${project.parent.version}</version>
</dependency>
in short, I don't think PR is solving the problem.
Comment From: jitokim
In the issue https://github.com/spring-projects/spring-ai/issues/1622 , spring-ai-azure-openai
model is used, not spring-ai-openai
.
But it has not spring-ai-retry
module.
(it is same in some other modules)
https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-azure-openai/pom.xml
i think the other solution is adding spring-ai-retry
module to starter like spring-ai-starter-azure-openai
https://github.com/spring-projects/spring-ai/blob/v1.0.0-M3/spring-ai-spring-boot-starters/spring-ai-starter-azure-openai/pom.xml
Isn't pr's solution better?
@zhuyuy @markpollack What do you think?
Comment From: zhuyuy
Yes, the issue uses spring-ai-azure-openai
, not spring-ai-openai
, it hasn't spring-ai-retry
.
Expected @ConditionalOnClass
is false, but actually is true, because the condition is org.springframework.retry.support.RetryTemplate
, a class in spring-retry
, not spring-ai-retry
.
I believe that this condition is indeed unreasonable. PR is fine
Comment From: markpollack
Thanks for the clarification. indeed, for those implementations that don't use Spring Retry (as they already provide it in the SDK or we just haven't gotten to it yet) it would pose a problem. Testing for a fix in spring-ai-retry
is the way to go.
Comment From: markpollack
merged in 99d9864972c0fd69951dafd66cdfade70333ed5f