Class ResponseTextDoneEvent
-
- All Implemented Interfaces:
public final class ResponseTextDoneEvent
Returned when the text value of a "text" content part 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
ResponseTextDoneEvent.Builder
A builder for ResponseTextDoneEvent.
-
Method Summary
Modifier and Type Method Description final Long
contentIndex()
The index of the content part in the item's content array. final String
eventId()
The unique ID of the server event. final String
itemId()
The ID of the item. final Long
outputIndex()
The index of the output item in the response. final String
responseId()
The ID of the response. final String
text()
The final text content. final JsonValue
_type()
The event type, must be response.text.done
.final JsonField<Long>
_contentIndex()
Returns the raw JSON value of contentIndex. final JsonField<String>
_eventId()
Returns the raw JSON value of eventId. final JsonField<String>
_itemId()
Returns the raw JSON value of itemId. final JsonField<Long>
_outputIndex()
Returns the raw JSON value of outputIndex. final JsonField<String>
_responseId()
Returns the raw JSON value of responseId. final JsonField<String>
_text()
Returns the raw JSON value of text. final Map<String, JsonValue>
_additionalProperties()
final ResponseTextDoneEvent.Builder
toBuilder()
final ResponseTextDoneEvent
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ResponseTextDoneEvent.Builder
builder()
Returns a mutable builder for constructing an instance of ResponseTextDoneEvent. -
-
Method Detail
-
contentIndex
final Long contentIndex()
The index of the content part in the item's content array.
-
outputIndex
final Long outputIndex()
The index of the output item in the response.
-
responseId
final String responseId()
The ID of the response.
-
_type
final JsonValue _type()
The event type, must be
response.text.done
.Expected to always return the following:
JsonValue.from("response.text.done")
However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_contentIndex
final JsonField<Long> _contentIndex()
Returns the raw JSON value of contentIndex.
Unlike contentIndex, this method doesn't throw if the JSON field has an unexpected type.
-
_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.
-
_itemId
final JsonField<String> _itemId()
Returns the raw JSON value of itemId.
Unlike itemId, 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.
-
_text
final JsonField<String> _text()
Returns the raw JSON value of text.
Unlike text, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ResponseTextDoneEvent.Builder toBuilder()
-
validate
final ResponseTextDoneEvent validate()
-
builder
final static ResponseTextDoneEvent.Builder builder()
Returns a mutable builder for constructing an instance of ResponseTextDoneEvent.
The following fields are required:
.contentIndex() .eventId() .itemId() .outputIndex() .responseId() .text()
-
-
-
-