Skip to content

CitationLocation module-attribute

Specifies the precise location within a source document where cited content can be found. This can include character-level positions, page numbers, or document chunks depending on the document type and indexing method.

Union Members

CitationLocationWeb dataclass

The web URL that was cited for this reference.

Source code in src/aws_sdk_bedrock_runtime/models.py
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
@dataclass
class CitationLocationWeb:
    """The web URL that was cited for this reference."""

    value: WebLocation

    def serialize(self, serializer: ShapeSerializer):
        serializer.write_struct(_SCHEMA_CITATION_LOCATION, self)

    def serialize_members(self, serializer: ShapeSerializer):
        serializer.write_struct(_SCHEMA_CITATION_LOCATION.members["web"], self.value)

    @classmethod
    def deserialize(cls, deserializer: ShapeDeserializer) -> Self:
        return cls(value=WebLocation.deserialize(deserializer))

CitationLocationDocumentChar dataclass

The character-level location within the document where the cited content is found.

Source code in src/aws_sdk_bedrock_runtime/models.py
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
@dataclass
class CitationLocationDocumentChar:
    """The character-level location within the document where the cited content
    is found.
    """

    value: DocumentCharLocation

    def serialize(self, serializer: ShapeSerializer):
        serializer.write_struct(_SCHEMA_CITATION_LOCATION, self)

    def serialize_members(self, serializer: ShapeSerializer):
        serializer.write_struct(
            _SCHEMA_CITATION_LOCATION.members["documentChar"], self.value
        )

    @classmethod
    def deserialize(cls, deserializer: ShapeDeserializer) -> Self:
        return cls(value=DocumentCharLocation.deserialize(deserializer))

CitationLocationDocumentPage dataclass

The page-level location within the document where the cited content is found.

Source code in src/aws_sdk_bedrock_runtime/models.py
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
@dataclass
class CitationLocationDocumentPage:
    """The page-level location within the document where the cited content is
    found.
    """

    value: DocumentPageLocation

    def serialize(self, serializer: ShapeSerializer):
        serializer.write_struct(_SCHEMA_CITATION_LOCATION, self)

    def serialize_members(self, serializer: ShapeSerializer):
        serializer.write_struct(
            _SCHEMA_CITATION_LOCATION.members["documentPage"], self.value
        )

    @classmethod
    def deserialize(cls, deserializer: ShapeDeserializer) -> Self:
        return cls(value=DocumentPageLocation.deserialize(deserializer))

CitationLocationDocumentChunk dataclass

The chunk-level location within the document where the cited content is found, typically used for documents that have been segmented into logical chunks.

Source code in src/aws_sdk_bedrock_runtime/models.py
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
@dataclass
class CitationLocationDocumentChunk:
    """The chunk-level location within the document where the cited content is
    found, typically used for documents that have been segmented into
    logical chunks.
    """

    value: DocumentChunkLocation

    def serialize(self, serializer: ShapeSerializer):
        serializer.write_struct(_SCHEMA_CITATION_LOCATION, self)

    def serialize_members(self, serializer: ShapeSerializer):
        serializer.write_struct(
            _SCHEMA_CITATION_LOCATION.members["documentChunk"], self.value
        )

    @classmethod
    def deserialize(cls, deserializer: ShapeDeserializer) -> Self:
        return cls(value=DocumentChunkLocation.deserialize(deserializer))

CitationLocationUnknown dataclass

Represents an unknown variant.

If you receive this value, you will need to update your library to receive the parsed value.

This value may not be deliberately sent.

Source code in src/aws_sdk_bedrock_runtime/models.py
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
@dataclass
class CitationLocationUnknown:
    """Represents an unknown variant.

    If you receive this value, you will need to update your library to receive the
    parsed value.

    This value may not be deliberately sent.
    """

    tag: str

    def serialize(self, serializer: ShapeSerializer):
        raise SerializationError("Unknown union variants may not be serialized.")

    def serialize_members(self, serializer: ShapeSerializer):
        raise SerializationError("Unknown union variants may not be serialized.")

    @classmethod
    def deserialize(cls, deserializer: ShapeDeserializer) -> Self:
        raise NotImplementedError()