| 63 | |
| 64 | |
| 65 | class Entity(BaseModel): |
| 66 | entity_name: str = Field(..., description="The name of the entity.") |
| 67 | entity_type: str = Field(..., description="The type of the entity.") |
| 68 | description: str = Field( |
| 69 | ..., description="The description of the entity, in details and comprehensive." |
| 70 | ) |
| 71 | importance_score: float = Field( |
| 72 | ..., |
| 73 | ge=0, |
| 74 | le=1, |
| 75 | description="Importance score of the entity. Should be between 0 and 1 with 1 being the most important.", |
| 76 | ) |
| 77 | |
| 78 | def to_dict(self): |
| 79 | return { |
| 80 | "entity_name": clean_str(self.entity_name.upper()), |
| 81 | "entity_type": clean_str(self.entity_type.upper()), |
| 82 | "description": clean_str(self.description), |
| 83 | "importance_score": float(self.importance_score), |
| 84 | } |
| 85 | |
| 86 | |
| 87 | class Relationship(BaseModel): |
nothing calls this directly
no outgoing calls
no test coverage detected