Package ai.octoryn.sdk
Record Class StreamEvent
java.lang.Object
java.lang.Record
ai.octoryn.sdk.StreamEvent
-
Constructor Summary
ConstructorsConstructorDescriptionStreamEvent(String type, String text, ToolCall toolCall, Usage usage, String finishReason, GovernanceMetadata octoryn, com.fasterxml.jackson.databind.JsonNode providerEvent, Throwable error) Creates an instance of aStreamEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.error()Returns the value of theerrorrecord component.Returns the value of thefinishReasonrecord component.final inthashCode()Returns a hash code value for this object.octoryn()Returns the value of theoctorynrecord component.com.fasterxml.jackson.databind.JsonNodeReturns the value of theproviderEventrecord component.static StreamEventstart(GovernanceMetadata metadata) text()Returns the value of thetextrecord component.toolCall()Returns the value of thetoolCallrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.usage()Returns the value of theusagerecord component.
-
Constructor Details
-
StreamEvent
public StreamEvent(String type, String text, ToolCall toolCall, Usage usage, String finishReason, GovernanceMetadata octoryn, com.fasterxml.jackson.databind.JsonNode providerEvent, Throwable error) Creates an instance of aStreamEventrecord class.- Parameters:
type- the value for thetyperecord componenttext- the value for thetextrecord componenttoolCall- the value for thetoolCallrecord componentusage- the value for theusagerecord componentfinishReason- the value for thefinishReasonrecord componentoctoryn- the value for theoctorynrecord componentproviderEvent- the value for theproviderEventrecord componenterror- the value for theerrorrecord component
-
-
Method Details
-
start
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
toolCall
Returns the value of thetoolCallrecord component.- Returns:
- the value of the
toolCallrecord component
-
usage
Returns the value of theusagerecord component.- Returns:
- the value of the
usagerecord component
-
finishReason
Returns the value of thefinishReasonrecord component.- Returns:
- the value of the
finishReasonrecord component
-
octoryn
Returns the value of theoctorynrecord component.- Returns:
- the value of the
octorynrecord component
-
providerEvent
public com.fasterxml.jackson.databind.JsonNode providerEvent()Returns the value of theproviderEventrecord component.- Returns:
- the value of the
providerEventrecord component
-
error
Returns the value of theerrorrecord component.- Returns:
- the value of the
errorrecord component
-