| 41 | |
| 42 | |
| 43 | class 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 | |
| 57 | class Message(BaseModel): |
nothing calls this directly
no outgoing calls
no test coverage detected