-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathschemas.py
37 lines (24 loc) · 960 Bytes
/
schemas.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from typing import List, Optional, Tuple
from pydantic import BaseModel, Field
# pydantic schemas
class ElemListSchema(BaseModel):
elem_list: List[str]
class RelationshipsSchema(BaseModel):
relationships: List[Tuple[str, ...]]
class Sensor(BaseModel):
name: str = Field("name of the sensor")
uuid: Optional[str] = Field("Identifier of the sensor")
unit: Optional[str] = Field("Unit of measure of the sensor")
class SensorSchema(BaseModel):
sensors: List[Sensor] = Field("List of the sensors")
class TTLSchema(BaseModel):
ttl_output: str = Field(
..., description="The generated BrickSchema turtle/rdf script."
)
class TTLToBuildingPromptSchema(BaseModel):
building_description: str = Field(
..., description="The generated building description."
)
key_elements: List[str] = Field(
..., description="The generated list of key elements."
)