Interface OpenAiHttpClientBuilderCustomizer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Callback for customizing the
SpringAiOpenAiHttpClient.Builder used by every
OpenAI *Model before the underlying OkHttpClient is built. Implement
this interface to register OkHttp interceptors (for example, a Spring Security OAuth2
client-credentials interceptor), swap the dispatcher ExecutorService, or tweak
any other OkHttp setting exposed by the builder.- Since:
- 2.0.0
- Author:
- Thomas Vitale
-
Method Summary
Modifier and TypeMethodDescriptionvoidCustomize theSpringAiOpenAiHttpClient.Builderprior to building the underlying OkHttp client.
-
Method Details
-
customize
Customize theSpringAiOpenAiHttpClient.Builderprior to building the underlying OkHttp client.- Parameters:
builder- the builder to customize
-