MCPcopy Create free account
hub / github.com/Azure-Samples/llama-index-python / Annotation

Class Annotation

backend/app/api/routers/models.py:43–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41
42
43class Annotation(BaseModel):
44 type: str
45 data: AnnotationData
46
47 def to_content(self) -> str:
48 if self.type == "csv":
49 csv_files = self.data.csv_files
50 if csv_files is not None and len(csv_files) > 0:
51 return "Use data from following CSV raw contents\n" + "\n".join(
52 [f"```csv\n{csv_file.content}\n```" for csv_file in csv_files]
53 )
54 raise ValueError(f"Unsupported annotation type: {self.type}")
55
56
57class Message(BaseModel):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected