Skip to content

Commit 884e619

Browse files
fix: added model docs #737
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent b0f369f commit 884e619

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

backend/services/models.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,38 @@
33

44
# Model of a selected facet value and its mention (that is, the original query text that resolved to the value).
55
class SelectedValue(BaseModel):
6+
"""
7+
Represents a selected facet value and its mention in the original query text.
8+
9+
Attributes:
10+
term (str): The resolved facet value.
11+
mention (str): The original query text that resolved to the value.
12+
"""
613
term: str
714
mention: str
815

916

1017
# Model of a selected facet and its resolved values.
1118
class FacetSelection(BaseModel):
19+
"""
20+
Represents a selected facet and its resolved values.
21+
22+
Attributes:
23+
facet (str): The name of the facet.
24+
selectedValues (list[SelectedValue]): The list of selected values for this facet.
25+
"""
1226
facet: str
1327
selectedValues: list[SelectedValue]
1428

1529

1630
# Model of the selected facets for a given query, resolved and normalized via LLM.
1731
class FacetsResponse(BaseModel):
32+
"""
33+
Represents the selected facets for a given query, resolved and normalized via LLM.
34+
35+
Attributes:
36+
query (str): The original query string.
37+
facets (list[FacetSelection]): The list of selected facets and their values.
38+
"""
1839
query: str
1940
facets: list[FacetSelection]

0 commit comments

Comments
 (0)