MYousafRana commited on
Commit
b2032cd
·
verified ·
1 Parent(s): b91a8b9

Update models.py

Browse files
Files changed (1) hide show
  1. models.py +66 -39
models.py CHANGED
@@ -1,39 +1,66 @@
1
- # models.py
2
- from pydantic import BaseModel, Field
3
- from typing import List, Dict, Optional
4
-
5
- class TravelDataInput(BaseModel):
6
- destination: Optional[str] = Field(None, description="e.g., Neelum Valley")
7
- location_type: str = Field(..., description="City, Beach, Mountain, etc.")
8
- province: str = Field(..., description="Punjab, Sindh, etc.")
9
- starting_location: str = Field(..., description="e.g., Islamabad")
10
- gender: str = Field(..., description="Male, Female, Mixed")
11
- num_people: int = Field(..., gt=0, description="Number of people")
12
- has_children: bool = Field(False, description="Whether children are present")
13
- activity_type: str = Field(..., description="Adventure, Sightseeing, Both")
14
- travel_group: str = Field(..., description="Solo, With partner, etc.")
15
- preferences: List[str] = Field([], description="Cultural Experience, Food, etc.")
16
- budget: int = Field(0, ge=0, description="Budget in PKR")
17
- num_days: int = Field(..., gt=0, description="Number of days")
18
- additional_preferences: Optional[str] = Field(None, description="Any other requests")
19
-
20
- class PlanResponse(BaseModel):
21
- plan_text: str
22
- destination_used: str
23
- images: List[Dict]
24
- image_queries_used: List[str]
25
- source: str
26
-
27
- class ChatMessage(BaseModel):
28
- role: str # user or assistant
29
- content: str
30
-
31
- class ChatInput(BaseModel):
32
- plan_text: str
33
- destination: str
34
- num_days: int
35
- chat_history: List[ChatMessage]
36
- user_input: str
37
-
38
- class ChatResponse(BaseModel):
39
- assistant_response: str
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # models.py
2
+ from pydantic import BaseModel, Field
3
+ from typing import List, Dict, Optional
4
+
5
+
6
+ class TravelDataInput(BaseModel):
7
+ destination: Optional[str] = Field(None, description="e.g., Neelum Valley")
8
+ location_type: str = Field(..., description="City, Beach, Mountain, etc.")
9
+ province: str = Field(..., description="Punjab, Sindh, etc.")
10
+ starting_location: str = Field(..., description="e.g., Islamabad")
11
+ gender: str = Field(..., description="Male, Female, Mixed")
12
+ num_people: int = Field(..., gt=0, description="Number of people")
13
+ has_children: bool = Field(False, description="Whether children are present")
14
+ activity_type: str = Field(..., description="Adventure, Sightseeing, Both")
15
+ travel_group: str = Field(..., description="Solo, With partner, etc.")
16
+ preferences: List[str] = Field([], description="Cultural Experience, Food, etc.")
17
+ budget: int = Field(0, ge=0, description="Budget in PKR")
18
+ num_days: int = Field(..., gt=0, description="Number of days")
19
+ additional_preferences: Optional[str] = Field(None, description="Any other requests")
20
+
21
+
22
+ class PlanResponse(BaseModel):
23
+ plan_text: str
24
+ destination_used: str
25
+ images: List[Dict]
26
+ image_queries_used: List[str]
27
+ source: str
28
+
29
+
30
+ class ExtractionInput(BaseModel):
31
+ plan_text: str
32
+
33
+
34
+ class PackageData(BaseModel):
35
+ packageName: str
36
+ packageDescription: str
37
+ packageDestination: str
38
+ packageDays: int
39
+ packageNights: int
40
+ packageAccommodation: str
41
+ packageTransportation: str
42
+ packageMeals: str
43
+ packageActivities: str
44
+ packagePrice: Optional[float]
45
+ packageDiscountPrice: Optional[float]
46
+ packageOffer: bool
47
+ packageRating: int
48
+ packageTotalRatings: int
49
+ packageImages: Optional[List[Dict]] = None
50
+
51
+
52
+ class ChatMessage(BaseModel):
53
+ role: str # user or assistant
54
+ content: str
55
+
56
+
57
+ class ChatInput(BaseModel):
58
+ plan_text: str
59
+ destination: str
60
+ num_days: int
61
+ chat_history: List[ChatMessage]
62
+ user_input: str
63
+
64
+
65
+ class ChatResponse(BaseModel):
66
+ assistant_response: str