Class BetaResponseCodeInterpreterToolCall.Output
-
- All Implemented Interfaces:
public final class BetaResponseCodeInterpreterToolCall.OutputThe logs output from the code interpreter.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaResponseCodeInterpreterToolCall.Output.VisitorAn interface that defines how to map each variant of Output to a value of type T.
public final classBetaResponseCodeInterpreterToolCall.Output.LogsThe logs output from the code interpreter.
public final classBetaResponseCodeInterpreterToolCall.Output.ImageThe image output from the code interpreter.
-
Method Summary
Modifier and Type Method Description final Optional<BetaResponseCodeInterpreterToolCall.Output.Logs>logs()The logs output from the code interpreter. final Optional<BetaResponseCodeInterpreterToolCall.Output.Image>image()The image output from the code interpreter. final BooleanisLogs()final BooleanisImage()final BetaResponseCodeInterpreterToolCall.Output.LogsasLogs()The logs output from the code interpreter. final BetaResponseCodeInterpreterToolCall.Output.ImageasImage()The image output from the code interpreter. final Optional<JsonValue>_json()final <T extends Any> Taccept(BetaResponseCodeInterpreterToolCall.Output.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final BetaResponseCodeInterpreterToolCall.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 BetaResponseCodeInterpreterToolCall.OutputofLogs(BetaResponseCodeInterpreterToolCall.Output.Logs logs)The logs output from the code interpreter. final static BetaResponseCodeInterpreterToolCall.OutputofImage(BetaResponseCodeInterpreterToolCall.Output.Image image)The image output from the code interpreter. -
-
Method Detail
-
logs
final Optional<BetaResponseCodeInterpreterToolCall.Output.Logs> logs()
The logs output from the code interpreter.
-
image
final Optional<BetaResponseCodeInterpreterToolCall.Output.Image> image()
The image output from the code interpreter.
-
asLogs
final BetaResponseCodeInterpreterToolCall.Output.Logs asLogs()
The logs output from the code interpreter.
-
asImage
final BetaResponseCodeInterpreterToolCall.Output.Image asImage()
The image output from the code interpreter.
-
accept
final <T extends Any> T accept(BetaResponseCodeInterpreterToolCall.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> visitLogs(Logs logs) { return Optional.of(logs.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final BetaResponseCodeInterpreterToolCall.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.
-
ofLogs
final static BetaResponseCodeInterpreterToolCall.Output ofLogs(BetaResponseCodeInterpreterToolCall.Output.Logs logs)
The logs output from the code interpreter.
-
ofImage
final static BetaResponseCodeInterpreterToolCall.Output ofImage(BetaResponseCodeInterpreterToolCall.Output.Image image)
The image output from the code interpreter.
-
-
-
-