Record Class OciGenAiStreamingChatModel.Event
java.lang.Object
java.lang.Record
com.oracle.coherence.rag.model.oci.OciGenAiStreamingChatModel.Event
- Record Components:
apiFormat- the API format identifiertext- the direct text content (for some event types)message- the structured message contentfinishReason- the reason for completion (null for partial responses)
- Enclosing class:
OciGenAiStreamingChatModel
public static record OciGenAiStreamingChatModel.Event(String apiFormat, String text, OciGenAiStreamingChatModel.EventMessage message, String finishReason)
extends Record
Represents a streaming event from OCI GenAI service.
This record encapsulates the structure of server-sent events received during streaming chat responses. Events can contain either partial response text or completion signals with finish reasons.
- Since:
- 25.09
- Author:
- Aleks Seovic 2025.07.04
-
Constructor Summary
ConstructorsConstructorDescriptionEvent(String apiFormat, String text, OciGenAiStreamingChatModel.EventMessage message, String finishReason) Creates an instance of aEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theapiFormatrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefinishReasonrecord component.final inthashCode()Returns a hash code value for this object.message()Returns the value of themessagerecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Event
public Event(String apiFormat, String text, OciGenAiStreamingChatModel.EventMessage message, String finishReason) Creates an instance of aEventrecord class.- Parameters:
apiFormat- the value for theapiFormatrecord componenttext- the value for thetextrecord componentmessage- the value for themessagerecord componentfinishReason- the value for thefinishReasonrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
apiFormat
-
text
-
message
-
finishReason
Returns the value of thefinishReasonrecord component.- Returns:
- the value of the
finishReasonrecord component
-