ankush13r commited on
Commit
d7102d8
·
verified ·
1 Parent(s): 5f9dbfa

Update tools.py

Browse files
Files changed (1) hide show
  1. tools.py +7 -7
tools.py CHANGED
@@ -83,7 +83,7 @@ def tool_register(cls: BaseModel):
83
  tools[oaitool["function"]["name"]] = cls
84
 
85
  @tool_register
86
- class hotel_summary(ToolBase):
87
  """Retrieves basic information about the hotel, such as its name, address, contact details, and overall description."""
88
 
89
  @classmethod
@@ -103,8 +103,8 @@ class hotel_facilities(ToolBase):
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
110
  def invoke(cls, input: Dict) -> str:
@@ -138,16 +138,16 @@ class restaurants_info(ToolBase):
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
  """
145
  @classmethod
146
  def invoke(cls, input: Dict) -> str:
147
  return json_data["room_types"]
148
 
149
 
150
- @tool_register
151
  class check_room_availability(ToolBase):
152
  """
153
  Checks if a specified room type is available between the provided check-in and check-out dates for a given number of guests.
@@ -203,7 +203,7 @@ class make_reservation(ToolBase):
203
  Creates a new reservation for the hotel by booking a room of the specified type for the desired dates, and associating the booking with a user.
204
  """
205
 
206
- user_name: int = Field(description="The name of user who is doing reservation.")
207
  room_type: str = Field(default=list(json_data["room_types"].keys()), description="The type of room being reserved.")
208
  check_in_date: str = Field(description="The starting date of the reservation (e.g., \"2025-04-01\")")
209
  check_out_date: str = Field(description="The ending date of the reservation (e.g., \"2025-04-05\").")
 
83
  tools[oaitool["function"]["name"]] = cls
84
 
85
  @tool_register
86
+ class hotel_description(ToolBase):
87
  """Retrieves basic information about the hotel, such as its name, address, contact details, and overall description."""
88
 
89
  @classmethod
 
103
  return json_data["general_facilities"]
104
 
105
  @tool_register
106
+ class restaurants_details(ToolBase):
107
+ """Provides a list of available restaurants with their details."""
108
 
109
  @classmethod
110
  def invoke(cls, input: Dict) -> str:
 
138
 
139
 
140
  @tool_register
141
+ class rooms_information(ToolBase):
142
  """
143
+ Returns a list information about rooms available at the hotel along with brief descriptions of each type.
144
  """
145
  @classmethod
146
  def invoke(cls, input: Dict) -> str:
147
  return json_data["room_types"]
148
 
149
 
150
+ #@tool_register
151
  class check_room_availability(ToolBase):
152
  """
153
  Checks if a specified room type is available between the provided check-in and check-out dates for a given number of guests.
 
203
  Creates a new reservation for the hotel by booking a room of the specified type for the desired dates, and associating the booking with a user.
204
  """
205
 
206
+ user_name: str = Field(description="The name of user who is doing the reservation.")
207
  room_type: str = Field(default=list(json_data["room_types"].keys()), description="The type of room being reserved.")
208
  check_in_date: str = Field(description="The starting date of the reservation (e.g., \"2025-04-01\")")
209
  check_out_date: str = Field(description="The ending date of the reservation (e.g., \"2025-04-05\").")