Class OCICohereChatModel

java.lang.Object
org.springframework.ai.oci.cohere.OCICohereChatModel
All Implemented Interfaces:
ChatModel, StreamingChatModel, org.springframework.ai.model.Model<org.springframework.ai.chat.prompt.Prompt,ChatResponse>, org.springframework.ai.model.StreamingModel<org.springframework.ai.chat.prompt.Prompt,ChatResponse>

public class OCICohereChatModel extends Object implements ChatModel
ChatModel implementation that uses the OCI GenAI Chat API.
Since:
1.0.0
Author:
Anders Swanson, Alexandros Pappas
  • Constructor Details

    • OCICohereChatModel

      public OCICohereChatModel(com.oracle.bmc.generativeaiinference.GenerativeAiInference genAi, OCICohereChatOptions options)
    • OCICohereChatModel

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

    • call

      public ChatResponse call(org.springframework.ai.chat.prompt.Prompt prompt)
      Specified by:
      call in interface ChatModel
      Specified by:
      call in interface org.springframework.ai.model.Model<org.springframework.ai.chat.prompt.Prompt,ChatResponse>
    • getDefaultOptions

      public org.springframework.ai.chat.prompt.ChatOptions getDefaultOptions()
      Specified by:
      getDefaultOptions in interface ChatModel
    • setObservationConvention

      public void setObservationConvention(org.springframework.ai.chat.observation.ChatModelObservationConvention observationConvention)
      Use the provided convention for reporting observation data
      Parameters:
      observationConvention - The provided convention