Package org.springframework.ai.openai
Class OpenAiEmbeddingOptions
java.lang.Object
org.springframework.ai.openai.AbstractOpenAiOptions
org.springframework.ai.openai.OpenAiEmbeddingOptions
- All Implemented Interfaces:
EmbeddingOptions,ModelOptions
Configuration information for the Embedding Model implementation using the OpenAI Java
SDK.
- Author:
- Julien Dubois, Christian Tzolov, Ilayaperumal Gopinathan, Sebastien Deleuze
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic enumThe format to return the embeddings in.Nested classes/interfaces inherited from class org.springframework.ai.openai.AbstractOpenAiOptions
AbstractOpenAiOptions.AbstractBuilder<O extends AbstractOpenAiOptions,B extends AbstractOpenAiOptions.AbstractBuilder<O, B>> -
Field Summary
FieldsFields inherited from class org.springframework.ai.openai.AbstractOpenAiOptions
DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedOpenAiEmbeddingOptions(@Nullable String baseUrl, @Nullable String apiKey, @Nullable com.openai.credential.Credential credential, @Nullable String model, @Nullable String microsoftDeploymentName, @Nullable com.openai.azure.AzureOpenAIServiceVersion microsoftFoundryServiceVersion, @Nullable String organizationId, @Nullable Boolean isMicrosoftFoundry, @Nullable Boolean isGitHubModels, @Nullable Duration timeout, @Nullable Integer maxRetries, @Nullable Proxy proxy, @Nullable Map<String, String> customHeaders, @Nullable String user, @Nullable OpenAiEmbeddingOptions.EncodingFormat encodingFormat, @Nullable Integer dimensions) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()@Nullable Integer@Nullable OpenAiEmbeddingOptions.EncodingFormat@Nullable StringgetUser()com.openai.models.embeddings.EmbeddingCreateParamstoOpenAiCreateParams(List<String> instructions) Methods inherited from class org.springframework.ai.openai.AbstractOpenAiOptions
getApiKey, getBaseUrl, getCredential, getCustomHeaders, getDeploymentName, getMaxRetries, getMicrosoftDeploymentName, getMicrosoftFoundryServiceVersion, getModel, getOrganizationId, getProxy, getTimeout, isGitHubModels, isMicrosoftFoundryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.ai.embedding.EmbeddingOptions
getModel
-
Field Details
-
DEFAULT_EMBEDDING_MODEL
-
-
Constructor Details
-
OpenAiEmbeddingOptions
protected OpenAiEmbeddingOptions(@Nullable String baseUrl, @Nullable String apiKey, @Nullable com.openai.credential.Credential credential, @Nullable String model, @Nullable String microsoftDeploymentName, @Nullable com.openai.azure.AzureOpenAIServiceVersion microsoftFoundryServiceVersion, @Nullable String organizationId, @Nullable Boolean isMicrosoftFoundry, @Nullable Boolean isGitHubModels, @Nullable Duration timeout, @Nullable Integer maxRetries, @Nullable Proxy proxy, @Nullable Map<String, String> customHeaders, @Nullable String user, @Nullable OpenAiEmbeddingOptions.EncodingFormat encodingFormat, @Nullable Integer dimensions)
-
-
Method Details
-
builder
-
getUser
-
getEncodingFormat
-
getDimensions
- Specified by:
getDimensionsin interfaceEmbeddingOptions
-
toOpenAiCreateParams
-