Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1202,20 +1202,28 @@ def classify(platform, UserInput, Images, Textbox2, Textbox3):
|
|
1202 |
|
1203 |
arguments_str = comp["function_call"]["arguments"]
|
1204 |
arguments_dict = json.loads(arguments_str)
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
|
|
|
|
|
|
|
|
|
|
1215 |
|
1216 |
print("FUNCTION_RESPONSE:", function_response)
|
1217 |
# print("ARGUMENTS VALUES:", arguments_dict["location"], arguments_dict["unit"])
|
1218 |
-
|
|
|
|
|
|
|
1219 |
|
1220 |
# messages.append(comp)
|
1221 |
# messages.append({
|
|
|
1202 |
|
1203 |
arguments_str = comp["function_call"]["arguments"]
|
1204 |
arguments_dict = json.loads(arguments_str)
|
1205 |
+
|
1206 |
+
if function_name == "clear_history":
|
1207 |
+
function_response = clear_history(
|
1208 |
+
command=arguments_dict["command"]
|
1209 |
+
)
|
1210 |
+
elif function_name == "book_enquiry":
|
1211 |
+
function_response = book_enquiry(
|
1212 |
+
full_name=arguments_dict["full_name"],
|
1213 |
+
contact_number=arguments_dict["contact_number"],
|
1214 |
+
street_address=arguments_dict["street_address"],
|
1215 |
+
landmark=arguments_dict["landmark"],
|
1216 |
+
zip_code=arguments_dict["zip_code"],
|
1217 |
+
emirate=arguments_dict["emirate"],
|
1218 |
+
reason=arguments_dict["reason"]
|
1219 |
+
)
|
1220 |
|
1221 |
print("FUNCTION_RESPONSE:", function_response)
|
1222 |
# print("ARGUMENTS VALUES:", arguments_dict["location"], arguments_dict["unit"])
|
1223 |
+
if function_name == "clear_history":
|
1224 |
+
print(f"ARGUMENTS VALUES: Command: {arguments_dict['command']}")
|
1225 |
+
elif function_name == "book_enquiry":
|
1226 |
+
print(f"ARGUMENTS VALUES: Full_name: {arguments_dict['full_name']}, Contact Number: {arguments_dict['contact_number']}, Street Address: {arguments_dict['street_address']}, Landmark: {arguments_dict['landmark']}, Zip Code: {arguments_dict['zip_code']}, Emirate: {arguments_dict['emirate']}, Reason: {arguments_dict['reason']}")
|
1227 |
|
1228 |
# messages.append(comp)
|
1229 |
# messages.append({
|