Class VertexAiPaLm2EmbeddingClient

java.lang.Object
org.springframework.ai.embedding.AbstractEmbeddingClient
org.springframework.ai.vertexai.palm2.VertexAiPaLm2EmbeddingClient
All Implemented Interfaces:
EmbeddingClient, ModelClient<EmbeddingRequest,EmbeddingResponse>

public class VertexAiPaLm2EmbeddingClient extends AbstractEmbeddingClient
Author:
Christian Tzolov
  • Constructor Details

    • VertexAiPaLm2EmbeddingClient

      public VertexAiPaLm2EmbeddingClient(VertexAiPaLm2Api vertexAiApi)
  • Method Details

    • embed

      public List<Double> embed(Document document)
      Description copied from interface: EmbeddingClient
      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: ModelClient
      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