Spaces:
Running
Running
Ankush Rana
commited on
Commit
·
7671e0e
1
Parent(s):
d2fd83d
retrive hotel info function
Browse files
tools.py
CHANGED
@@ -100,7 +100,7 @@ def tool_register(cls: BaseModel):
|
|
100 |
oitools.append(oaitool)
|
101 |
tools[oaitool["function"]["name"]] = cls
|
102 |
|
103 |
-
@tool_register
|
104 |
class hotel_description(ToolBase):
|
105 |
"""Retrieves basic information about the hotel, such as its name, address, contact details, and overall description."""
|
106 |
|
@@ -113,6 +113,21 @@ For an unforgettable stay, guests can choose from **special packages**, includin
|
|
113 |
Whether for relaxation or adventure, **Nou Vall de Núria** promises a unique and memorable experience."""
|
114 |
|
115 |
@tool_register
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
class hotel_facilities(ToolBase):
|
117 |
"""Provides a list of available general facilities at the hotel, which could include amenities like a spa, pool, gym, conference rooms, etc."""
|
118 |
|
@@ -215,6 +230,8 @@ class check_room_availability(ToolBase):
|
|
215 |
return rooms2
|
216 |
|
217 |
|
|
|
|
|
218 |
@tool_register
|
219 |
class make_reservation(ToolBase):
|
220 |
"""
|
|
|
100 |
oitools.append(oaitool)
|
101 |
tools[oaitool["function"]["name"]] = cls
|
102 |
|
103 |
+
# @tool_register
|
104 |
class hotel_description(ToolBase):
|
105 |
"""Retrieves basic information about the hotel, such as its name, address, contact details, and overall description."""
|
106 |
|
|
|
113 |
Whether for relaxation or adventure, **Nou Vall de Núria** promises a unique and memorable experience."""
|
114 |
|
115 |
@tool_register
|
116 |
+
class retrieve_hotel_info(ToolBase):
|
117 |
+
"""
|
118 |
+
Retrieves information about the hotel based on a user query.
|
119 |
+
"""
|
120 |
+
query: str = Field(description="The user query for retrieving hotel information.")
|
121 |
+
|
122 |
+
@classmethod
|
123 |
+
def invoke(cls, input: Dict) -> str:
|
124 |
+
query = input.get("query", None)
|
125 |
+
if not query:
|
126 |
+
return "Missing required argument: query."
|
127 |
+
|
128 |
+
return "We are currently working on it. You can't use this tool right now—please try again later. Thank you for your patience!"
|
129 |
+
|
130 |
+
# @tool_register
|
131 |
class hotel_facilities(ToolBase):
|
132 |
"""Provides a list of available general facilities at the hotel, which could include amenities like a spa, pool, gym, conference rooms, etc."""
|
133 |
|
|
|
230 |
return rooms2
|
231 |
|
232 |
|
233 |
+
|
234 |
+
|
235 |
@tool_register
|
236 |
class make_reservation(ToolBase):
|
237 |
"""
|