File size: 13,590 Bytes
7a38b33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28f26e5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7a38b33
 
 
 
 
 
 
 
 
 
 
 
 
 
28f26e5
 
 
 
7a38b33
28f26e5
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
from enum import Enum
from typing import Union
from pydantic import BaseModel, Field

#####
# avoid using the 'import' string, including words like 'important', etc.
class UpperGarmentProperties(BaseModel):
    upper_category: str
    neck: str
    sleeve: str
    shoulder: str
    waist: str
    length: str


class LowerGarmentProperties(BaseModel):
    lower_category: str
    waist: str
    hip: str
    rise: str
    leg: str


class HatProperties(BaseModel):
    style: str
    brim: str

class TargetAudience(BaseModel):
    age_range: str
    style_preference: str
    lifestyle: str

class Closure(BaseModel):
    color: str
    type: str
    location: str

class Pattern(BaseModel):
    type: str
    color: list[str]

class LuggageProperties(BaseModel):
    luggage_type: str = Field(..., description="Type of luggage, e.g., suitcase, duffel, backpack, etc.")
    size: str = Field(..., description="Size of the luggage, e.g., carry-on, large, extra-large")
    material: str = Field(..., description="Material used, e.g., leather, polyester, polycarbonate")
    color: list[str] = Field(..., description="Color of the luggage")
    weight: str = Field(..., description="Weight of the luggage in kg or lbs")
    compartments: int = Field(..., description="Number of compartments")
    wheels: str = Field(..., description="Wheel type, e.g., 2-wheel, 4-wheel, or spinner")
    handle_type: str = Field(..., description="Type of handle, e.g., retractable, fixed, or no handle")
    closure: Closure = Field(..., description="Closure details like type, color, and location")
    lock_type: str = Field(..., description="Lock type, e.g., TSA, combination, or none")
    expandable: bool = Field(..., description="Whether the luggage is expandable")
    waterproof: bool = Field(..., description="Whether the luggage is waterproof or water-resistant")

class HandbagProperties(BaseModel):
    handbag_type: str = Field(..., description="Type of handbag, e.g., tote, crossbody, clutch, etc.")
    size: str = Field(..., description="Size of the handbag, e.g., small, medium, large")
    material: str = Field(..., description="Material used, e.g., leather, canvas, suede")
    color: list[str] = Field(..., description="Color of the handbag")
    weight: str = Field(..., description="Weight of the handbag in kg or lbs")
    compartments: int = Field(..., description="Number of compartments in the handbag")
    strap_type: str = Field(..., description="Type of strap, e.g., adjustable, removable, fixed")
    handle_type: str = Field(..., description="Type of handle, e.g., top handle, shoulder strap, none")
    closure: Closure = Field(..., description="Closure details like type, color, and location")
    lock_type: str = Field(..., description="Lock type, e.g., magnetic, zipper, clasp, or none")
    pattern: Pattern = Field(..., description="Pattern details")
    occasion: list[str] = Field(..., description="Occasions suitable for the handbag, e.g., formal, casual, evening")
    waterproof: bool = Field(..., description="Whether the handbag is waterproof or water-resistant")

class MakeupProperties(BaseModel):
    makeup_type: str = Field(..., description="Type of makeup, e.g., foundation, lipstick, eyeshadow, mascara, etc.")
    shade: str = Field(..., description="Shade of the makeup product")
    finish: str = Field(..., description="Finish of the product, e.g., matte, dewy, satin, glossy, etc.")
    texture: str = Field(..., description="Texture of the product, e.g., creamy, powder, liquid")
    skin_type_compatibility: list[str] = Field(..., description="Skin types compatible with the product, e.g., dry, oily, combination")
    waterproof: bool = Field(..., description="Whether the product is waterproof or not")
    long_wear: bool = Field(..., description="Whether the product is long-wearing")
    cruelty_free: bool = Field(..., description="Whether the product is cruelty-free")
    vegan: bool = Field(..., description="Whether the product is vegan")
    ingredients: list[str] = Field(..., description="Key ingredients in the product")
    packaging_type: str = Field(..., description="Type of packaging, e.g., compact, tube, pump bottle")
    application_method: str = Field(..., description="How the product is applied, e.g., brush, sponge, fingers, applicator")
    ingredients: list[str] = Field(..., description="If visible in images, what ingredients are in the product")

class ChairProperties(BaseModel):
    chair_type: str = Field(..., description="Type of chair, e.g., office chair, dining chair, lounge chair")
    material: str = Field(..., description="Material used, e.g., wood, metal, fabric")
    upholstery_material: str = Field(..., description="Upholstery material, e.g., leather, fabric, mesh, none")
    color: list[str] = Field(..., description="Color of the chair")
    weight_capacity: str = Field(..., description="Maximum weight capacity of the chair in kg or lbs")
    dimensions: str = Field(..., description="Dimensions of the chair, e.g., height, width, depth")
    adjustable: bool = Field(..., description="Whether the chair is adjustable")
    swivel: bool = Field(..., description="Whether the chair can swivel")
    wheels: bool = Field(..., description="Whether the chair has wheels")
    ergonomic: bool = Field(..., description="Whether the chair is ergonomically designed")

class CarpetProperties(BaseModel):
    carpet_type: str = Field(..., description="Type of carpet, e.g., area rug, runner, mat")
    material: str = Field(..., description="Material used, e.g., wool, synthetic, cotton")
    color: list[str] = Field(..., description="Color of the carpet")
    dimensions: str = Field(..., description="Dimensions of the carpet, e.g., length and width")
    pile_height: str = Field(..., description="Pile height of the carpet in mm or inches")
    pattern: Pattern = Field(..., description="Pattern details of the carpet")
    anti_slip: bool = Field(..., description="Whether the carpet has anti-slip backing")
    washable: bool = Field(..., description="Whether the carpet is washable")
    indoor_outdoor: str = Field(..., description="Whether the carpet is meant for indoor or outdoor use")

class WatchProperties(BaseModel):
    watch_type: str = Field(..., description="Type of watch, e.g., analog, digital, smart watch, hybrid")
    movement_type: str = Field(..., description="Type of movement, e.g., quartz, mechanical, automatic, digital")
    material: str = Field(..., description="Material of the watch case, e.g., stainless steel, titanium, plastic")
    strap_material: str = Field(..., description="Material of the strap, e.g., leather, rubber, metal, nylon")
    strap_color: list[str] = Field(..., description="Color of the watch strap")
    dial_color: str = Field(..., description="Color of the watch dial")
    water_resistant: bool = Field(..., description="Whether the watch is water-resistant")
    water_resistance_depth: str = Field(..., description="Depth rating for water resistance in meters or feet")
    features: list[str] = Field(..., description="Special features like GPS, heart rate monitor, chronograph, etc.")
    case_diameter: str = Field(..., description="Diameter of the watch case in mm or inches")
    case_thickness: str = Field(..., description="Thickness of the watch case in mm or inches")
    weight: str = Field(..., description="Weight of the watch")
    display_type: str = Field(..., description="Display type for smart/digital watches, e.g., LED, AMOLED, LCD")
    battery_life: str = Field(..., description="Battery life for digital or smart watches")
    clasp_type: str = Field(..., description="Type of clasp or buckle, e.g., deployant, tang buckle, folding clasp")

class SleepwareProperties(BaseModel):
    sleepware_type: str = Field(..., description="Type of sleepware, e.g., pillow, duvet, mattress, mattress topper, blanket")
    material: str = Field(..., description="Material used, e.g., cotton, down, memory foam, microfiber")
    filling_material: str = Field(..., description="Filling material for pillows or duvets, e.g., down, feather, polyester")
    firmness: str = Field(..., description="Firmness level for pillows or mattresses, e.g., soft, medium, firm")
    size: str = Field(..., description="Size of the sleepware, e.g., queen, king, standard")
    weight: str = Field(..., description="Weight of the sleepware (mainly for duvets and blankets)")
    temperature_regulation: bool = Field(..., description="Whether the item has temperature regulation properties")
    hypoallergenic: bool = Field(..., description="Whether the item is hypoallergenic")
    machine_washable: bool = Field(..., description="Whether the item is machine washable")
    thread_count: str = Field(..., description="Thread count for items like sheets or pillowcases")
    moisture_wicking: bool = Field(..., description="Whether the material wicks away moisture")

class TablewareProperties(BaseModel):
    tableware_type: str = Field(..., description="Type of tableware, e.g., dinner plate, salad bowl, mug, cup, saucer")
    material: str = Field(..., description="Material of the tableware, e.g., porcelain, ceramic, glass, stoneware")
    color: list[str] = Field(..., description="Color of the tableware")
    pattern: Pattern = Field(..., description="Pattern details if applicable")
    diameter: str = Field(..., description="Diameter of the tableware (for plates or bowls)")
    volume: str = Field(..., description="Volume capacity for bowls, cups, mugs in ml or oz")
    dishwasher_safe: bool = Field(..., description="Whether the tableware is dishwasher safe")
    microwave_safe: bool = Field(..., description="Whether the tableware is microwave safe")
    oven_safe: bool = Field(..., description="Whether the tableware is oven safe")
    stackable: bool = Field(..., description="Whether the tableware is stackable")
    chip_resistant: bool = Field(..., description="Whether the tableware is chip-resistant")

class CookwareProperties(BaseModel):
    cookware_type: str = Field(..., description="Type of cookware, e.g., skillet, saucepan, stockpot, frying pan")
    material: str = Field(..., description="Material of the cookware, e.g., stainless steel, cast iron, non-stick, aluminum")
    diameter: str = Field(..., description="Diameter of the cookware in cm or inches")
    depth: str = Field(..., description="Depth of the cookware in cm or inches")
    weight: str = Field(..., description="Weight of the cookware in kg or lbs")
    non_stick: bool = Field(..., description="Whether the cookware is non-stick")
    induction_safe: bool = Field(..., description="Whether the cookware is safe for induction stoves")
    oven_safe: bool = Field(..., description="Whether the cookware is oven safe")
    max_oven_temperature: str = Field(..., description="Maximum temperature in Celsius or Fahrenheit for oven use")
    dishwasher_safe: bool = Field(..., description="Whether the cookware is dishwasher safe")
    handle_material: str = Field(..., description="Material of the handle, e.g., stainless steel, silicone, wood")
    lid_included: bool = Field(..., description="Whether the cookware comes with a lid")
    heat_distribution: str = Field(..., description="Heat distribution technology, e.g., tri-ply, aluminum core")

class BathroomItemProperties(BaseModel):
    item_type: str = Field(..., description="Type of bathroom item, e.g., towel, bath mat, shower curtain")
    material: str = Field(..., description="Material of the item, e.g., cotton, microfiber, bamboo")
    size: str = Field(..., description="Size of the item, e.g., bath towel, hand towel, washcloth")
    gsm: str = Field(..., description="Grams per square meter (GSM) which indicates the density of the towel fabric")
    color: list[str] = Field(..., description="Color of the bathroom item")
    absorbency: str = Field(..., description="Absorbency level, e.g., high, medium, low")
    quick_dry: bool = Field(..., description="Whether the towel has quick-dry properties")
    softness: str = Field(..., description="Softness rating, e.g., ultra-soft, soft, firm")
    machine_washable: bool = Field(..., description="Whether the item is machine washable")
    pattern: Pattern = Field(..., description="Pattern details if applicable")
    anti_bacterial: bool = Field(..., description="Whether the towel has anti-bacterial properties")
    hypoallergenic: bool = Field(..., description="Whether the towel is hypoallergenic")



class Garment(BaseModel):  # don't rename this class
    category: str = Field(..., description='Category of the garment')
    gender: str
    material: str
    color: list[str] = Field(..., description='Color of the garment')
    pattern: Pattern
    style: str
    closure: Closure
    fit: str = Field(..., description='Should be one of slim fit, regular fit, loose fit')
    season: list[str]
    occasion: list[str]
    special_occasion: list[str] = Field(..., description='List up to three special occasions, such as weddings, halloween or graduation')
    usage: list[str]
    pairing: list[str]
    microtrends: list[str]
    silhouette: list[str]
    aesthetic: list[str]
    dressing_style: list[str]
    target_audience: list[TargetAudience]
    properties: Union[UpperGarmentProperties, LowerGarmentProperties, HatProperties, LuggageProperties, HandbagProperties, MakeupProperties, ChairProperties, CarpetProperties, WatchProperties, CookwareProperties, TablewareProperties, SleepwareProperties, BathroomItemProperties ] = Field(..., description="Specific properties for different product categories")