Class OCIEmbeddingModel

All Implemented Interfaces:
EmbeddingModel, Model<EmbeddingRequest,EmbeddingResponse>

public class OCIEmbeddingModel extends AbstractEmbeddingModel
EmbeddingModel implementation that uses the OCI GenAI Embedding API.
Since:
1.0.0
Author:
Anders Swanson
  • Constructor Details

    • OCIEmbeddingModel

      public OCIEmbeddingModel(com.oracle.bmc.generativeaiinference.GenerativeAiInference genAi, OCIEmbeddingOptions options)
    • OCIEmbeddingModel

      public OCIEmbeddingModel(com.oracle.bmc.generativeaiinference.GenerativeAiInference genAi, OCIEmbeddingOptions options, io.micrometer.observation.ObservationRegistry observationRegistry)
  • Method Details

    • 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
    • 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.