Class OCICohereChatModel
java.lang.Object
org.springframework.ai.oci.cohere.OCICohereChatModel
- All Implemented Interfaces:
ChatModel
,StreamingChatModel
,Model<Prompt,
,ChatResponse> StreamingModel<Prompt,
ChatResponse>
ChatModel
implementation that uses the OCI GenAI Chat API.- Since:
- 1.0.0
- Author:
- Anders Swanson
-
Constructor Summary
ConstructorDescriptionOCICohereChatModel
(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 TypeMethodDescriptionExecutes a method call to the AI model.void
setObservationConvention
(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, wait
Methods 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
Description copied from interface:Model
Executes a method call to the AI model. -
getDefaultOptions
- Specified by:
getDefaultOptions
in interfaceChatModel
-
setObservationConvention
Use the provided convention for reporting observation data- Parameters:
observationConvention
- The provided convention
-