Class OpenAiAutoConfigurationUtil
java.lang.Object
org.springframework.ai.model.openai.autoconfigure.OpenAiAutoConfigurationUtil
Utilities shared by the OpenAI auto-configurations to resolve the connection settings a
model is built with.
- Author:
- Christian Tzolov, Ilayaperumal Gopinathan, Thomas Vitale
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Method Summary
Modifier and TypeMethodDescriptionresolveCommonProperties(AbstractOpenAiProperties commonProperties, AbstractOpenAiProperties modelProperties) Resolve the connection properties from the common and model-level properties only, with the base URL and API key backed by the common properties.resolveCommonProperties(OpenAiConnectionDetails connectionDetails, AbstractOpenAiProperties commonProperties, AbstractOpenAiProperties modelProperties) Resolve the connection properties, taking the base URL and API key from the model properties when set and from the givenOpenAiConnectionDetailsotherwise.
-
Method Details
-
resolveCommonProperties
public static OpenAiAutoConfigurationUtil.ResolvedConnectionProperties resolveCommonProperties(AbstractOpenAiProperties commonProperties, AbstractOpenAiProperties modelProperties) Resolve the connection properties from the common and model-level properties only, with the base URL and API key backed by the common properties. -
resolveCommonProperties
public static OpenAiAutoConfigurationUtil.ResolvedConnectionProperties resolveCommonProperties(OpenAiConnectionDetails connectionDetails, AbstractOpenAiProperties commonProperties, AbstractOpenAiProperties modelProperties) Resolve the connection properties, taking the base URL and API key from the model properties when set and from the givenOpenAiConnectionDetailsotherwise.- Since:
- 2.1.0
-