Skip to content

Commit

Permalink
Merge pull request OpenNyAI#150 from kanak8278/docs
Browse files Browse the repository at this point in the history
Docs
  • Loading branch information
shreypandey authored Jul 17, 2024
2 parents 53164fb + c07dbab commit 8abe473
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions docs/tutorials/car_wash.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
Option,
ImageMessage,
)

from datetime import datetime
from jb_manager_bot.parsers import Parser, OptionParser


Expand Down Expand Up @@ -473,7 +473,7 @@ def on_enter_date_input(self):

def on_enter_date_logic(self):
self.status = Status.WAIT_FOR_ME
task = f"The user provides a date, convert it into a format of YYYY-MM-DD. Format and modify the user input into the format required and if you could not be decide return None. Based on the user's input, return the output in json format: {{'result': <input>}}"
task = f"The user provides a date or day, convert it into a format of YYYY-MM-DD. Today's date is {datetime.now().strftime("%Y-%m-%d")} & Day is {datetime.now().strftime("%A")}. Format and modify the user input into the format required and if you could not be decide return None. Based on the user's input, return the output in json format: {{'result': <input>}}."

result = Parser.parse_user_input(
task,
Expand Down Expand Up @@ -522,7 +522,6 @@ def on_enter_time_display(self):
)
self.status = Status.MOVE_FORWARD


def on_enter_time_input(self):
self.status = Status.WAIT_FOR_ME
self.status = Status.WAIT_FOR_USER_INPUT
Expand All @@ -546,7 +545,7 @@ def on_enter_time_logic(self):
model=self.credentials["FAST_MODEL"],
)
if result.isdigit():
result = slots[int(result) - 1].option_text
result = slots[int(result) - 1].option_text
setattr(self.variables, "appointment_time", result)
else:
setattr(self.variables, "appointment_time", None)
Expand All @@ -573,7 +572,11 @@ def on_enter_check_availability_plugin(self):
)
)

response = availability_plugin(self.variables.selected_service, self.variables.appointment_date, self.variables.appointment_time)
response = availability_plugin(
self.variables.selected_service,
self.variables.appointment_date,
self.variables.appointment_time,
)
self.variables.booking_status = response["booking_status"]
self.variables.appointment_image = response["appointment_image"]
self.variables.error_code = response["error_code"]
Expand Down

0 comments on commit 8abe473

Please sign in to comment.