Class VertexAiPaLm2EmbeddingModel

java.lang.Object
org.springframework.ai.embedding.AbstractEmbeddingModel
org.springframework.ai.vertexai.palm2.VertexAiPaLm2EmbeddingModel
All Implemented Interfaces:
EmbeddingModel, Model<EmbeddingRequest,EmbeddingResponse>

public class VertexAiPaLm2EmbeddingModel extends AbstractEmbeddingModel
Author:
Christian Tzolov
  • Constructor Details

    • VertexAiPaLm2EmbeddingModel

      public VertexAiPaLm2EmbeddingModel(VertexAiPaLm2Api vertexAiApi)
  • Method Details

    • embed

      public float[] embed(Document document)
      Description copied from interface: EmbeddingModel
      Embeds the given document's content into a vector.
      Parameters:
      document - the document to embed.
      Returns:
      the embedded vector.
    • call

      public EmbeddingResponse call(EmbeddingRequest request)
      Description copied from interface: Model
      Executes a method call to the AI model.
      Parameters:
      request - the request object to be sent to the AI model
      Returns:
      the response from the AI model