Class BetaResponseFunctionToolCallOutputItem.Output.BetaFunctionAndCustomToolCallOutput
-
- All Implemented Interfaces:
public final class BetaResponseFunctionToolCallOutputItem.Output.BetaFunctionAndCustomToolCallOutputA text input to the model.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaResponseFunctionToolCallOutputItem.Output.BetaFunctionAndCustomToolCallOutput.VisitorAn interface that defines how to map each variant of BetaFunctionAndCustomToolCallOutput to a value of type T.
-
Method Summary
-
-
Method Detail
-
inputText
final Optional<BetaResponseInputText> inputText()
A text input to the model.
-
inputImage
final Optional<BetaResponseInputImage> inputImage()
An image input to the model. Learn about image inputs.
-
inputFile
final Optional<BetaResponseInputFile> inputFile()
A file input to the model.
-
isInputText
final Boolean isInputText()
-
isInputImage
final Boolean isInputImage()
-
isInputFile
final Boolean isInputFile()
-
asInputText
final BetaResponseInputText asInputText()
A text input to the model.
-
asInputImage
final BetaResponseInputImage asInputImage()
An image input to the model. Learn about image inputs.
-
asInputFile
final BetaResponseInputFile asInputFile()
A file input to the model.
-
accept
final <T extends Any> T accept(BetaResponseFunctionToolCallOutputItem.Output.BetaFunctionAndCustomToolCallOutput.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 = betaFunctionAndCustomToolCallOutput.accept(new BetaFunctionAndCustomToolCallOutput.Visitor<Optional<String>>() { @Override public Optional<String> visitInputText(BetaResponseInputText inputText) { return Optional.of(inputText.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final BetaResponseFunctionToolCallOutputItem.Output.BetaFunctionAndCustomToolCallOutput 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.
-
ofInputText
final static BetaResponseFunctionToolCallOutputItem.Output.BetaFunctionAndCustomToolCallOutput ofInputText(BetaResponseInputText inputText)
A text input to the model.
-
ofInputImage
final static BetaResponseFunctionToolCallOutputItem.Output.BetaFunctionAndCustomToolCallOutput ofInputImage(BetaResponseInputImage inputImage)
An image input to the model. Learn about image inputs.
-
ofInputFile
final static BetaResponseFunctionToolCallOutputItem.Output.BetaFunctionAndCustomToolCallOutput ofInputFile(BetaResponseInputFile inputFile)
A file input to the model.
-
-
-
-