This pull request updates the API client, which is auto-configured, to utilize a RestClient.Builder
that is pre-configured by Spring Boot. This change allows for customization through RestClientCustomizer
, enabling the addition of interceptors (such as logging and retry processing) and changing to the underlying request factory.
https://docs.spring.io/spring-boot/docs/current/reference/html/io.html#io.rest-client.restclient.customization
Comment From: tzolov
Thanks @making , this makes sense. Will review it soon.
Comment From: tzolov
@making , Since we introduce an auto-conf dependency on RestClientAutoConfiguration.class
in the Ollama, OpenAi, Stability and Vertex AutoConfiguration classes i think we need to add the after
e.g.: @AutoConfiguration(after = RestClientAutoConfiguration.class,...)
?
Comment From: making
@tzolov I missed that point. fixed!
Comment From: tzolov
Thanks. LGTM. Will merge it shortly.
Comment From: tzolov
Rebased, squashed and merged at 7b58f426ec7bb12feac0f40dbdf0955202ba4799
@making , fyi, I had to add few missing AutoConfigurations.of(RestClientAutoConfiguration.class,
before the merge.