Class AnnotationDelta
-
- All Implemented Interfaces:
public final class AnnotationDeltaA citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the "file_search" tool to search files.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceAnnotationDelta.VisitorAn interface that defines how to map each variant of AnnotationDelta to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<FileCitationDeltaAnnotation>fileCitation()A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. final Optional<FilePathDeltaAnnotation>filePath()A URL for the file that's generated when the assistant used the code_interpretertool to generate a file.final BooleanisFileCitation()final BooleanisFilePath()final FileCitationDeltaAnnotationasFileCitation()A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. final FilePathDeltaAnnotationasFilePath()A URL for the file that's generated when the assistant used the code_interpretertool to generate a file.final Optional<JsonValue>_json()final <T extends Any> Taccept(AnnotationDelta.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final AnnotationDeltavalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static AnnotationDeltaofFileCitation(FileCitationDeltaAnnotation fileCitation)A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. final static AnnotationDeltaofFilePath(FilePathDeltaAnnotation filePath)A URL for the file that's generated when the assistant used the code_interpretertool to generate a file.-
-
Method Detail
-
fileCitation
final Optional<FileCitationDeltaAnnotation> fileCitation()
A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the "file_search" tool to search files.
-
filePath
final Optional<FilePathDeltaAnnotation> filePath()
A URL for the file that's generated when the assistant used the
code_interpretertool to generate a file.
-
isFileCitation
final Boolean isFileCitation()
-
isFilePath
final Boolean isFilePath()
-
asFileCitation
final FileCitationDeltaAnnotation asFileCitation()
A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the "file_search" tool to search files.
-
asFilePath
final FilePathDeltaAnnotation asFilePath()
A URL for the file that's generated when the assistant used the
code_interpretertool to generate a file.
-
accept
final <T extends Any> T accept(AnnotationDelta.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 = annotationDelta.accept(new AnnotationDelta.Visitor<Optional<String>>() { @Override public Optional<String> visitFileCitation(FileCitationDeltaAnnotation fileCitation) { return Optional.of(fileCitation.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final AnnotationDelta 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.
-
ofFileCitation
final static AnnotationDelta ofFileCitation(FileCitationDeltaAnnotation fileCitation)
A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the "file_search" tool to search files.
-
ofFilePath
final static AnnotationDelta ofFilePath(FilePathDeltaAnnotation filePath)
A URL for the file that's generated when the assistant used the
code_interpretertool to generate a file.
-
-
-
-