Class ResponseOutputItemDoneEvent
-
- All Implemented Interfaces:
public final class ResponseOutputItemDoneEvent
Returned when an Item is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
ResponseOutputItemDoneEvent.Builder
A builder for ResponseOutputItemDoneEvent.
-
Method Summary
Modifier and Type Method Description final String
eventId()
The unique ID of the server event. final ConversationItem
item()
The item to add to the conversation. final Long
outputIndex()
The index of the output item in the Response. final String
responseId()
The ID of the Response to which the item belongs. final JsonValue
_type()
The event type, must be response.output_item.done
.final JsonField<String>
_eventId()
Returns the raw JSON value of eventId. final JsonField<ConversationItem>
_item()
Returns the raw JSON value of item. final JsonField<Long>
_outputIndex()
Returns the raw JSON value of outputIndex. final JsonField<String>
_responseId()
Returns the raw JSON value of responseId. final Map<String, JsonValue>
_additionalProperties()
final ResponseOutputItemDoneEvent.Builder
toBuilder()
final ResponseOutputItemDoneEvent
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ResponseOutputItemDoneEvent.Builder
builder()
Returns a mutable builder for constructing an instance of ResponseOutputItemDoneEvent. -
-
Method Detail
-
item
final ConversationItem item()
The item to add to the conversation.
-
outputIndex
final Long outputIndex()
The index of the output item in the Response.
-
responseId
final String responseId()
The ID of the Response to which the item belongs.
-
_type
final JsonValue _type()
The event type, must be
response.output_item.done
.Expected to always return the following:
JsonValue.from("response.output_item.done")
However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_eventId
final JsonField<String> _eventId()
Returns the raw JSON value of eventId.
Unlike eventId, this method doesn't throw if the JSON field has an unexpected type.
-
_item
final JsonField<ConversationItem> _item()
Returns the raw JSON value of item.
Unlike item, this method doesn't throw if the JSON field has an unexpected type.
-
_outputIndex
final JsonField<Long> _outputIndex()
Returns the raw JSON value of outputIndex.
Unlike outputIndex, this method doesn't throw if the JSON field has an unexpected type.
-
_responseId
final JsonField<String> _responseId()
Returns the raw JSON value of responseId.
Unlike responseId, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ResponseOutputItemDoneEvent.Builder toBuilder()
-
validate
final ResponseOutputItemDoneEvent validate()
-
builder
final static ResponseOutputItemDoneEvent.Builder builder()
Returns a mutable builder for constructing an instance of ResponseOutputItemDoneEvent.
The following fields are required:
.eventId() .item() .outputIndex() .responseId()
-
-
-
-