Class OCIEmbeddingModel

java.lang.Object
org.springframework.ai.embedding.AbstractEmbeddingModel
org.springframework.ai.oci.OCIEmbeddingModel
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 OCIEmbeddingModel extends org.springframework.ai.embedding.AbstractEmbeddingModel
EmbeddingModel implementation that uses the OCI GenAI Embedding API.
Since:
1.0.0
Author:
Anders Swanson
  • Field Summary

    Fields inherited from class org.springframework.ai.embedding.AbstractEmbeddingModel

    embeddingDimensions
  • Constructor Summary

    Constructors
    Constructor
    Description
    OCIEmbeddingModel(com.oracle.bmc.generativeaiinference.GenerativeAiInference genAi, OCIEmbeddingOptions options)
     
    OCIEmbeddingModel(com.oracle.bmc.generativeaiinference.GenerativeAiInference genAi, OCIEmbeddingOptions options, io.micrometer.observation.ObservationRegistry observationRegistry)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.ai.embedding.EmbeddingResponse
    call(org.springframework.ai.embedding.EmbeddingRequest request)
     
    float[]
    embed(org.springframework.ai.document.Document document)
     

    Methods inherited from class org.springframework.ai.embedding.AbstractEmbeddingModel

    dimensions, dimensions

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.ai.embedding.EmbeddingModel

    embed, embed, embed, embedForResponse
  • 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 org.springframework.ai.embedding.EmbeddingResponse call(org.springframework.ai.embedding.EmbeddingRequest request)
    • embed

      public float[] embed(org.springframework.ai.document.Document document)