Class CitationContentBlockLocation
-
- All Implemented Interfaces:
public final class CitationContentBlockLocation
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classCitationContentBlockLocation.BuilderA builder for CitationContentBlockLocation.
-
Method Summary
Modifier and Type Method Description final CitationContentBlockLocationParamtoParam()final StringcitedText()The full text of the cited block range, concatenated. final LongdocumentIndex()final Optional<String>documentTitle()final LongendBlockIndex()Exclusive 0-based end index of the cited block range in the source's contentarray.final Optional<String>fileId()final LongstartBlockIndex()0-based index of the first cited block in the source's contentarray.final JsonValue_type()Expected to always return the following:
However, this method can be useful for debugging and logging (e.g.JsonValue.from("content_block_location")final JsonField<String>_citedText()Returns the raw JSON value of citedText. final JsonField<Long>_documentIndex()Returns the raw JSON value of documentIndex. final JsonField<String>_documentTitle()Returns the raw JSON value of documentTitle. final JsonField<Long>_endBlockIndex()Returns the raw JSON value of endBlockIndex. final JsonField<String>_fileId()Returns the raw JSON value of fileId. final JsonField<Long>_startBlockIndex()Returns the raw JSON value of startBlockIndex. final Map<String, JsonValue>_additionalProperties()final CitationContentBlockLocation.BuildertoBuilder()final CitationContentBlockLocationvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static CitationContentBlockLocation.Builderbuilder()Returns a mutable builder for constructing an instance of CitationContentBlockLocation. -
-
Method Detail
-
toParam
final CitationContentBlockLocationParam toParam()
-
citedText
final String citedText()
The full text of the cited block range, concatenated.
Always equals the contents of
content[start_block_index:end_block_index]joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns.
-
documentIndex
final Long documentIndex()
-
documentTitle
final Optional<String> documentTitle()
-
endBlockIndex
final Long endBlockIndex()
Exclusive 0-based end index of the cited block range in the source's
contentarray.Always greater than
start_block_index; a single-block citation hasend_block_index = start_block_index + 1.
-
startBlockIndex
final Long startBlockIndex()
0-based index of the first cited block in the source's
contentarray.
-
_type
final JsonValue _type()
Expected to always return the following:
JsonValue.from("content_block_location")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_citedText
final JsonField<String> _citedText()
Returns the raw JSON value of citedText.
Unlike citedText, this method doesn't throw if the JSON field has an unexpected type.
-
_documentIndex
final JsonField<Long> _documentIndex()
Returns the raw JSON value of documentIndex.
Unlike documentIndex, this method doesn't throw if the JSON field has an unexpected type.
-
_documentTitle
final JsonField<String> _documentTitle()
Returns the raw JSON value of documentTitle.
Unlike documentTitle, this method doesn't throw if the JSON field has an unexpected type.
-
_endBlockIndex
final JsonField<Long> _endBlockIndex()
Returns the raw JSON value of endBlockIndex.
Unlike endBlockIndex, this method doesn't throw if the JSON field has an unexpected type.
-
_fileId
final JsonField<String> _fileId()
Returns the raw JSON value of fileId.
Unlike fileId, this method doesn't throw if the JSON field has an unexpected type.
-
_startBlockIndex
final JsonField<Long> _startBlockIndex()
Returns the raw JSON value of startBlockIndex.
Unlike startBlockIndex, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final CitationContentBlockLocation.Builder toBuilder()
-
validate
final CitationContentBlockLocation 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.
-
builder
final static CitationContentBlockLocation.Builder builder()
Returns a mutable builder for constructing an instance of CitationContentBlockLocation.
The following fields are required:
.citedText() .documentIndex() .documentTitle() .endBlockIndex() .fileId() .startBlockIndex()
-
-
-
-