Class BetaResponsesClientEvent.ResponseCreate.Conversation
-
- All Implemented Interfaces:
public final class BetaResponsesClientEvent.ResponseCreate.ConversationThe conversation that this response belongs to. Items from this conversation are prepended to
input_itemsfor this response request. Input items and output items from this response are automatically added to this conversation after this response completes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaResponsesClientEvent.ResponseCreate.Conversation.VisitorAn interface that defines how to map each variant of Conversation to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<String>id()The unique ID of the conversation. final Optional<BetaResponseConversationParam>betaResponseConversationParam()The conversation that this response belongs to. final BooleanisId()final BooleanisBetaResponseConversationParam()final StringasId()The unique ID of the conversation. final BetaResponseConversationParamasBetaResponseConversationParam()The conversation that this response belongs to. final Optional<JsonValue>_json()final <T extends Any> Taccept(BetaResponsesClientEvent.ResponseCreate.Conversation.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final BetaResponsesClientEvent.ResponseCreate.Conversationvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaResponsesClientEvent.ResponseCreate.ConversationofId(String id)The unique ID of the conversation. final static BetaResponsesClientEvent.ResponseCreate.ConversationofBetaResponseConversationParam(BetaResponseConversationParam betaResponseConversationParam)The conversation that this response belongs to. -
-
Method Detail
-
betaResponseConversationParam
final Optional<BetaResponseConversationParam> betaResponseConversationParam()
The conversation that this response belongs to.
-
isBetaResponseConversationParam
final Boolean isBetaResponseConversationParam()
-
asBetaResponseConversationParam
final BetaResponseConversationParam asBetaResponseConversationParam()
The conversation that this response belongs to.
-
accept
final <T extends Any> T accept(BetaResponsesClientEvent.ResponseCreate.Conversation.Visitor<T> visitor)
Maps this instance's current variant to a value of type T using the given visitor.
Note that this method is not forwards compatible with new variants from the API, unless visitor overrides Visitor.unknown. To handle variants not known to this version of the SDK gracefully, consider overriding Visitor.unknown:
import com.openai.core.JsonValue; import java.util.Optional; Optional<String> result = conversation.accept(new Conversation.Visitor<Optional<String>>() { @Override public Optional<String> visitId(String id) { return Optional.of(id.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final BetaResponsesClientEvent.ResponseCreate.Conversation validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
ofId
final static BetaResponsesClientEvent.ResponseCreate.Conversation ofId(String id)
The unique ID of the conversation.
-
ofBetaResponseConversationParam
final static BetaResponsesClientEvent.ResponseCreate.Conversation ofBetaResponseConversationParam(BetaResponseConversationParam betaResponseConversationParam)
The conversation that this response belongs to.
-
-
-
-