Spaces:
Running
Running
Update tools.py
Browse files
tools.py
CHANGED
@@ -83,7 +83,7 @@ def tool_register(cls: BaseModel):
|
|
83 |
tools[oaitool["function"]["name"]] = cls
|
84 |
|
85 |
@tool_register
|
86 |
-
class
|
87 |
"""Retrieves basic information about the hotel, such as its name, address, contact details, and overall description."""
|
88 |
|
89 |
@classmethod
|
@@ -95,7 +95,7 @@ For an unforgettable stay, guests can choose from **special packages**, includin
|
|
95 |
Whether for relaxation or adventure, **Nou Vall de Núria** promises a unique and memorable experience."""
|
96 |
|
97 |
@tool_register
|
98 |
-
class
|
99 |
"""Provides a list of available general facilities at the hotel, which could include amenities like a spa, pool, gym, conference rooms, etc."""
|
100 |
|
101 |
@classmethod
|
@@ -103,7 +103,7 @@ class get_hotel_facilities(ToolBase):
|
|
103 |
return json_data["general_facilities"]
|
104 |
|
105 |
@tool_register
|
106 |
-
class
|
107 |
"""Provides a list of available restaurants with their information."""
|
108 |
|
109 |
@classmethod
|
@@ -116,7 +116,7 @@ class get_restaurants_info(ToolBase):
|
|
116 |
|
117 |
|
118 |
# @tool_register
|
119 |
-
# class
|
120 |
# """Retrieves detailed information about a specific restaurant in the hotel, including its menu, ambiance, operating hours, and special features."""
|
121 |
|
122 |
# name: str = Field(default=[res["name"] for res in json_data["restaurants"]], description="Name of the resaturant")
|
@@ -138,7 +138,7 @@ class get_restaurants_info(ToolBase):
|
|
138 |
|
139 |
|
140 |
@tool_register
|
141 |
-
class
|
142 |
"""
|
143 |
Returns a list of room types available at the hotel (e.g., single, double, suite, deluxe) along with brief descriptions of each type.
|
144 |
"""
|
@@ -384,7 +384,7 @@ class modify_reservation(ToolBase):
|
|
384 |
return f"The reservation {reservation_id} is modified correctly: {json.dumps(tmp_data)}"
|
385 |
|
386 |
@tool_register
|
387 |
-
class
|
388 |
"""Playing a specific playlist by its name."""
|
389 |
|
390 |
user_id: int = Field(description="Id of user, could be passport or national Identity number")
|
@@ -417,4 +417,4 @@ class get_reservation_details(ToolBase):
|
|
417 |
|
418 |
tmp_data = copy.deepcopy(reservations["reservation_id"])
|
419 |
tmp_data.pop("user_id")
|
420 |
-
return json.dumps(tmp_data)
|
|
|
83 |
tools[oaitool["function"]["name"]] = cls
|
84 |
|
85 |
@tool_register
|
86 |
+
class hotel_information(ToolBase):
|
87 |
"""Retrieves basic information about the hotel, such as its name, address, contact details, and overall description."""
|
88 |
|
89 |
@classmethod
|
|
|
95 |
Whether for relaxation or adventure, **Nou Vall de Núria** promises a unique and memorable experience."""
|
96 |
|
97 |
@tool_register
|
98 |
+
class hotel_facilities(ToolBase):
|
99 |
"""Provides a list of available general facilities at the hotel, which could include amenities like a spa, pool, gym, conference rooms, etc."""
|
100 |
|
101 |
@classmethod
|
|
|
103 |
return json_data["general_facilities"]
|
104 |
|
105 |
@tool_register
|
106 |
+
class restaurants_info(ToolBase):
|
107 |
"""Provides a list of available restaurants with their information."""
|
108 |
|
109 |
@classmethod
|
|
|
116 |
|
117 |
|
118 |
# @tool_register
|
119 |
+
# class restaurant_details(ToolBase):
|
120 |
# """Retrieves detailed information about a specific restaurant in the hotel, including its menu, ambiance, operating hours, and special features."""
|
121 |
|
122 |
# name: str = Field(default=[res["name"] for res in json_data["restaurants"]], description="Name of the resaturant")
|
|
|
138 |
|
139 |
|
140 |
@tool_register
|
141 |
+
class room_types(ToolBase):
|
142 |
"""
|
143 |
Returns a list of room types available at the hotel (e.g., single, double, suite, deluxe) along with brief descriptions of each type.
|
144 |
"""
|
|
|
384 |
return f"The reservation {reservation_id} is modified correctly: {json.dumps(tmp_data)}"
|
385 |
|
386 |
@tool_register
|
387 |
+
class reservation_details(ToolBase):
|
388 |
"""Playing a specific playlist by its name."""
|
389 |
|
390 |
user_id: int = Field(description="Id of user, could be passport or national Identity number")
|
|
|
417 |
|
418 |
tmp_data = copy.deepcopy(reservations["reservation_id"])
|
419 |
tmp_data.pop("user_id")
|
420 |
+
return json.dumps(tmp_data)
|