Class BetaResponseInputItem.FunctionCallOutput.Output
-
- All Implemented Interfaces:
public final class BetaResponseInputItem.FunctionCallOutput.OutputText, image, or file output of the function tool call.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaResponseInputItem.FunctionCallOutput.Output.VisitorAn interface that defines how to map each variant of Output to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<String>string()A JSON string of the output of the function tool call. final Optional<List<BetaResponseFunctionCallOutputItem>>betaResponseFunctionCallOutputItemList()An array of content outputs (text, image, file) for the function tool call. final BooleanisString()final BooleanisBetaResponseFunctionCallOutputItemList()final StringasString()A JSON string of the output of the function tool call. final List<BetaResponseFunctionCallOutputItem>asBetaResponseFunctionCallOutputItemList()An array of content outputs (text, image, file) for the function tool call. final Optional<JsonValue>_json()final <T extends Any> Taccept(BetaResponseInputItem.FunctionCallOutput.Output.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final BetaResponseInputItem.FunctionCallOutput.Outputvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaResponseInputItem.FunctionCallOutput.OutputofString(String string)A JSON string of the output of the function tool call. final static BetaResponseInputItem.FunctionCallOutput.OutputofBetaResponseFunctionCallOutputItemList(List<BetaResponseFunctionCallOutputItem> betaResponseFunctionCallOutputItemList)An array of content outputs (text, image, file) for the function tool call. -
-
Method Detail
-
betaResponseFunctionCallOutputItemList
final Optional<List<BetaResponseFunctionCallOutputItem>> betaResponseFunctionCallOutputItemList()
An array of content outputs (text, image, file) for the function tool call.
-
isBetaResponseFunctionCallOutputItemList
final Boolean isBetaResponseFunctionCallOutputItemList()
-
asBetaResponseFunctionCallOutputItemList
final List<BetaResponseFunctionCallOutputItem> asBetaResponseFunctionCallOutputItemList()
An array of content outputs (text, image, file) for the function tool call.
-
accept
final <T extends Any> T accept(BetaResponseInputItem.FunctionCallOutput.Output.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 = output.accept(new Output.Visitor<Optional<String>>() { @Override public Optional<String> visitString(String string) { return Optional.of(string.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final BetaResponseInputItem.FunctionCallOutput.Output 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.
-
ofString
final static BetaResponseInputItem.FunctionCallOutput.Output ofString(String string)
A JSON string of the output of the function tool call.
-
ofBetaResponseFunctionCallOutputItemList
final static BetaResponseInputItem.FunctionCallOutput.Output ofBetaResponseFunctionCallOutputItemList(List<BetaResponseFunctionCallOutputItem> betaResponseFunctionCallOutputItemList)
An array of content outputs (text, image, file) for the function tool call.
-
-
-
-