Class RealtimeConversationItemSystemMessage
-
- All Implemented Interfaces:
public final class RealtimeConversationItemSystemMessage
A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. "the user is now asking about a different topic"), use system messages.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
RealtimeConversationItemSystemMessage.Builder
A builder for RealtimeConversationItemSystemMessage.
public final class
RealtimeConversationItemSystemMessage.Content
public final class
RealtimeConversationItemSystemMessage.Object
Identifier for the API object being returned - always
realtime.item
. Optional when creating a new item.public final class
RealtimeConversationItemSystemMessage.Status
The status of the item. Has no effect on the conversation.
-
Method Summary
-
-
Method Detail
-
content
final List<RealtimeConversationItemSystemMessage.Content> content()
The content of the message.
-
_role
final JsonValue _role()
The role of the message sender. Always
system
.Expected to always return the following:
JsonValue.from("system")
However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_type
final JsonValue _type()
The type of the item. Always
message
.Expected to always return the following:
JsonValue.from("message")
However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
id
final Optional<String> id()
The unique ID of the item. This may be provided by the client or generated by the server.
-
object_
final Optional<RealtimeConversationItemSystemMessage.Object> object_()
Identifier for the API object being returned - always
realtime.item
. Optional when creating a new item.
-
status
final Optional<RealtimeConversationItemSystemMessage.Status> status()
The status of the item. Has no effect on the conversation.
-
_content
final JsonField<List<RealtimeConversationItemSystemMessage.Content>> _content()
Returns the raw JSON value of content.
Unlike content, this method doesn't throw if the JSON field has an unexpected type.
-
_id
final JsonField<String> _id()
Returns the raw JSON value of id.
Unlike id, this method doesn't throw if the JSON field has an unexpected type.
-
_object_
final JsonField<RealtimeConversationItemSystemMessage.Object> _object_()
Returns the raw JSON value of object_.
Unlike object_, this method doesn't throw if the JSON field has an unexpected type.
-
_status
final JsonField<RealtimeConversationItemSystemMessage.Status> _status()
Returns the raw JSON value of status.
Unlike status, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final RealtimeConversationItemSystemMessage.Builder toBuilder()
-
validate
final RealtimeConversationItemSystemMessage validate()
-
builder
final static RealtimeConversationItemSystemMessage.Builder builder()
Returns a mutable builder for constructing an instance of RealtimeConversationItemSystemMessage.
The following fields are required:
.content()
-
-
-
-