Version: latest
agrag.common.data_models.graph_schema.PropertySpec
Bases: BaseModel
The declaration of one property on an entity type.
A spec describes the property but does not validate extracted values.
Attributes:
- type (
PropertyType) – The value type:string,integer,float,booleanordate. - required (
bool) – Whether an entity of this type should carry the property. - enum (
list[str] | None) – Allowed values as text, or None for no restriction. Each value must be a valid text form oftype. - description (
str) – Guidance for the extractor. Empty when there is none.
Functions:
- describe – Render this property as one prompt phrase.
describe
describe(name:str) -> str
Render this property as one prompt phrase.
description
description: str = ''
enum
enum: list[str] | None = None
model_config
model_config = ConfigDict(extra='forbid')
required
required: bool = False
type
type: PropertyType