Package ai.acolite.agentsdk.core
Record Class RunItemStreamEvent
java.lang.Object
java.lang.Record
ai.acolite.agentsdk.core.RunItemStreamEvent
- All Implemented Interfaces:
RunStreamEvent
public record RunItemStreamEvent(RunItem item, int turnIndex)
extends Record
implements RunStreamEvent
RunItemStreamEvent
Emitted when a new item is added to the conversation (message, tool call, tool output, etc.)
Source: https://github.com/openai/openai-agents-js/blob/main/packages/agents-core/src/events.ts
-
Constructor Summary
ConstructorsConstructorDescriptionRunItemStreamEvent(RunItem item, int turnIndex) Creates an instance of aRunItemStreamEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.getType()final inthashCode()Returns a hash code value for this object.item()Returns the value of theitemrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of theturnIndexrecord component.
-
Constructor Details
-
RunItemStreamEvent
Creates an instance of aRunItemStreamEventrecord class.- Parameters:
item- the value for theitemrecord componentturnIndex- the value for theturnIndexrecord component
-
-
Method Details
-
getType
- Specified by:
getTypein interfaceRunStreamEvent
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
item
Returns the value of theitemrecord component.- Returns:
- the value of the
itemrecord component
-
turnIndex
public int turnIndex()Returns the value of theturnIndexrecord component.- Returns:
- the value of the
turnIndexrecord component
-