MCPcopy Create free account
hub / github.com/LLMQuant/quant-mind / Citation

Class Citation

quantmind/knowledge/_base.py:28–39  ·  view source on GitHub ↗

A pointer back to the source span an extracted fact came from.

Source from the content-addressed store, hash-verified

26from pydantic import BaseModel, ConfigDict, Field
27from typing_extensions import Self
28
29
30class Citation(BaseModel):
31 """A pointer back to the source span an extracted fact came from."""
32
33 model_config = ConfigDict(extra="forbid", frozen=True)
34
35 source_id: str
36 page: int | None = None
37 char_offset: int | None = None
38 quote: str | None = Field(default=None, max_length=500)
39 # When the citation points into a TreeKnowledge, anchor to a specific node.
40 tree_id: UUID | None = None
41 node_id: UUID | None = None
42

Callers 3

test_minimalMethod · 0.90
test_quote_max_lengthMethod · 0.90

Calls

no outgoing calls

Tested by 3

test_minimalMethod · 0.72
test_quote_max_lengthMethod · 0.72