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>
ChatModel implementation that uses the OCI GenAI Chat API.- Since:
- 1.0.0
- Author:
- Anders Swanson, Alexandros Pappas
-
Constructor Summary
ConstructorsConstructorDescriptionOCICohereChatModel(com.oracle.bmc.generativeaiinference.GenerativeAiInference genAi, OCICohereChatOptions options) OCICohereChatModel(com.oracle.bmc.generativeaiinference.GenerativeAiInference genAi, OCICohereChatOptions options, io.micrometer.observation.ObservationRegistry observationRegistry) -
Method Summary
Modifier and TypeMethodDescriptioncall(org.springframework.ai.chat.prompt.Prompt prompt) org.springframework.ai.chat.prompt.ChatOptionsvoidsetObservationConvention(org.springframework.ai.chat.observation.ChatModelObservationConvention observationConvention) Use the provided convention for reporting observation dataMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.ai.chat.model.StreamingChatModel
stream, stream
-
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
- Specified by:
callin interfaceChatModel- Specified by:
callin interfaceorg.springframework.ai.model.Model<org.springframework.ai.chat.prompt.Prompt,ChatResponse>
-
getDefaultOptions
public org.springframework.ai.chat.prompt.ChatOptions getDefaultOptions()- Specified by:
getDefaultOptionsin interfaceChatModel
-
setObservationConvention
public void setObservationConvention(org.springframework.ai.chat.observation.ChatModelObservationConvention observationConvention) Use the provided convention for reporting observation data- Parameters:
observationConvention- The provided convention
-