Class ResponseCreateEvent
-
- All Implemented Interfaces:
public final class ResponseCreateEvent
This event instructs the server to create a Response, which means triggering model inference. When in Server VAD mode, the server will create Responses automatically.
A Response will include at least one Item, and may have two, in which case the second will be a function call. These Items will be appended to the conversation history.
The server will respond with a
response.created
event, events for Items and content created, and finally aresponse.done
event to indicate the Response is complete.The
response.create
event includes inference configuration likeinstructions
, andtemperature
. These fields will override the Session's configuration for this Response only.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
ResponseCreateEvent.Builder
A builder for ResponseCreateEvent.
public final class
ResponseCreateEvent.Response
Create a new Realtime response with these parameters
-
Method Summary
Modifier and Type Method Description final JsonValue
_type()
The event type, must be response.create
.final Optional<String>
eventId()
Optional client-generated ID used to identify this event. final Optional<ResponseCreateEvent.Response>
response()
Create a new Realtime response with these parameters final JsonField<String>
_eventId()
Returns the raw JSON value of eventId. final JsonField<ResponseCreateEvent.Response>
_response()
Returns the raw JSON value of response. final Map<String, JsonValue>
_additionalProperties()
final ResponseCreateEvent.Builder
toBuilder()
final ResponseCreateEvent
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ResponseCreateEvent.Builder
builder()
Returns a mutable builder for constructing an instance of ResponseCreateEvent. -
-
Method Detail
-
_type
final JsonValue _type()
The event type, must be
response.create
.Expected to always return the following:
JsonValue.from("response.create")
However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
response
final Optional<ResponseCreateEvent.Response> response()
Create a new Realtime response with these parameters
-
_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.
-
_response
final JsonField<ResponseCreateEvent.Response> _response()
Returns the raw JSON value of response.
Unlike response, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ResponseCreateEvent.Builder toBuilder()
-
validate
final ResponseCreateEvent validate()
-
builder
final static ResponseCreateEvent.Builder builder()
Returns a mutable builder for constructing an instance of ResponseCreateEvent.
-
-
-
-