Class ResponseInputItem.FunctionCallOutput.Output
-
- All Implemented Interfaces:
public final class ResponseInputItem.FunctionCallOutput.OutputText, image, or file output of the function tool call.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceResponseInputItem.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<ResponseFunctionCallOutputItem>>responseFunctionCallOutputItemList()An array of content outputs (text, image, file) for the function tool call. final BooleanisString()final BooleanisResponseFunctionCallOutputItemList()final StringasString()A JSON string of the output of the function tool call. final List<ResponseFunctionCallOutputItem>asResponseFunctionCallOutputItemList()An array of content outputs (text, image, file) for the function tool call. final Optional<JsonValue>_json()final <T extends Any> Taccept(ResponseInputItem.FunctionCallOutput.Output.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final ResponseInputItem.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 ResponseInputItem.FunctionCallOutput.OutputofString(String string)A JSON string of the output of the function tool call. final static ResponseInputItem.FunctionCallOutput.OutputofResponseFunctionCallOutputItemList(List<ResponseFunctionCallOutputItem> responseFunctionCallOutputItemList)An array of content outputs (text, image, file) for the function tool call. -
-
Method Detail
-
responseFunctionCallOutputItemList
final Optional<List<ResponseFunctionCallOutputItem>> responseFunctionCallOutputItemList()
An array of content outputs (text, image, file) for the function tool call.
-
isResponseFunctionCallOutputItemList
final Boolean isResponseFunctionCallOutputItemList()
-
asResponseFunctionCallOutputItemList
final List<ResponseFunctionCallOutputItem> asResponseFunctionCallOutputItemList()
An array of content outputs (text, image, file) for the function tool call.
-
accept
final <T extends Any> T accept(ResponseInputItem.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 ResponseInputItem.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 ResponseInputItem.FunctionCallOutput.Output ofString(String string)
A JSON string of the output of the function tool call.
-
ofResponseFunctionCallOutputItemList
final static ResponseInputItem.FunctionCallOutput.Output ofResponseFunctionCallOutputItemList(List<ResponseFunctionCallOutputItem> responseFunctionCallOutputItemList)
An array of content outputs (text, image, file) for the function tool call.
-
-
-
-