langchain_cohere.common.CohereCitation¶
- class langchain_cohere.common.CohereCitation(start: int, end: int, text: str, documents: List[Mapping[str, Any]], document_ids: Set[str])[source]¶
Cohere has fine-grained citations that specify the exact part of text. More info at https://docs.cohere.com/docs/documents-and-citations
Attributes
startThe index of text that the citation ends after, counting from zero.
endThe text of the citation.
textThe contents of the documents that were cited.
documentsA set of the id field from all the documents in the documents field.
document_idsMethods
__init__(start, end, text, documents, ...)- Parameters
start (int) –
end (int) –
text (str) –
documents (List[Mapping[str, Any]]) –
document_ids (Set[str]) –
- __init__(start: int, end: int, text: str, documents: List[Mapping[str, Any]], document_ids: Set[str]) None¶
- Parameters
start (int) –
end (int) –
text (str) –
documents (List[Mapping[str, Any]]) –
document_ids (Set[str]) –
- Return type
None