Class AzureOpenAiEmbeddingModel
java.lang.Object
org.springframework.ai.embedding.AbstractEmbeddingModel
org.springframework.ai.azure.openai.AzureOpenAiEmbeddingModel
- All Implemented Interfaces:
org.springframework.ai.embedding.EmbeddingModel,org.springframework.ai.model.Model<org.springframework.ai.embedding.EmbeddingRequest,org.springframework.ai.embedding.EmbeddingResponse>
public class AzureOpenAiEmbeddingModel
extends org.springframework.ai.embedding.AbstractEmbeddingModel
Azure Open AI Embedding Model implementation.
- Since:
- 1.0.0
- Author:
- Mark Pollack, Christian Tzolov, Thomas Vitale, Soby Chacko
-
Field Summary
Fields inherited from class org.springframework.ai.embedding.AbstractEmbeddingModel
embeddingDimensions -
Constructor Summary
ConstructorsConstructorDescriptionAzureOpenAiEmbeddingModel(com.azure.ai.openai.OpenAIClient azureOpenAiClient) AzureOpenAiEmbeddingModel(com.azure.ai.openai.OpenAIClient azureOpenAiClient, org.springframework.ai.document.MetadataMode metadataMode) AzureOpenAiEmbeddingModel(com.azure.ai.openai.OpenAIClient azureOpenAiClient, org.springframework.ai.document.MetadataMode metadataMode, AzureOpenAiEmbeddingOptions options) AzureOpenAiEmbeddingModel(com.azure.ai.openai.OpenAIClient azureOpenAiClient, org.springframework.ai.document.MetadataMode metadataMode, AzureOpenAiEmbeddingOptions options, io.micrometer.observation.ObservationRegistry observationRegistry) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.ai.embedding.EmbeddingResponsecall(org.springframework.ai.embedding.EmbeddingRequest embeddingRequest) float[]embed(org.springframework.ai.document.Document document) voidsetObservationConvention(org.springframework.ai.embedding.observation.EmbeddingModelObservationConvention observationConvention) Use the provided convention for reporting observation dataMethods inherited from class org.springframework.ai.embedding.AbstractEmbeddingModel
dimensions, dimensionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.ai.embedding.EmbeddingModel
embed, embed, embed, embedForResponse
-
Constructor Details
-
AzureOpenAiEmbeddingModel
public AzureOpenAiEmbeddingModel(com.azure.ai.openai.OpenAIClient azureOpenAiClient) -
AzureOpenAiEmbeddingModel
public AzureOpenAiEmbeddingModel(com.azure.ai.openai.OpenAIClient azureOpenAiClient, org.springframework.ai.document.MetadataMode metadataMode) -
AzureOpenAiEmbeddingModel
public AzureOpenAiEmbeddingModel(com.azure.ai.openai.OpenAIClient azureOpenAiClient, org.springframework.ai.document.MetadataMode metadataMode, AzureOpenAiEmbeddingOptions options) -
AzureOpenAiEmbeddingModel
public AzureOpenAiEmbeddingModel(com.azure.ai.openai.OpenAIClient azureOpenAiClient, org.springframework.ai.document.MetadataMode metadataMode, AzureOpenAiEmbeddingOptions options, io.micrometer.observation.ObservationRegistry observationRegistry)
-
-
Method Details
-
embed
public float[] embed(org.springframework.ai.document.Document document) -
call
public org.springframework.ai.embedding.EmbeddingResponse call(org.springframework.ai.embedding.EmbeddingRequest embeddingRequest) -
getDefaultOptions
-
setObservationConvention
public void setObservationConvention(org.springframework.ai.embedding.observation.EmbeddingModelObservationConvention observationConvention) Use the provided convention for reporting observation data- Parameters:
observationConvention- The provided convention
-