diff --git a/ai/__pycache__/local_ai_api.cpython-311.pyc b/ai/__pycache__/local_ai_api.cpython-311.pyc index bef71ec..4d79151 100644 Binary files a/ai/__pycache__/local_ai_api.cpython-311.pyc and b/ai/__pycache__/local_ai_api.cpython-311.pyc differ diff --git a/ai/local_ai_api.py b/ai/local_ai_api.py index 436012d..a8f0590 100644 --- a/ai/local_ai_api.py +++ b/ai/local_ai_api.py @@ -214,7 +214,7 @@ def await_response(ai_request_id: Any, options: Optional[Dict[str, Any]] = None) data = status_resp.get("data") or {} if isinstance(data, dict): status_value = data.get("status") - if status_value == "success": + if status_value in ["success", "completed"]: return { "success": True, "status": 200, diff --git a/config/__pycache__/__init__.cpython-311.pyc b/config/__pycache__/__init__.cpython-311.pyc index 0b7e7ae..1b5b0a4 100644 Binary files a/config/__pycache__/__init__.cpython-311.pyc and b/config/__pycache__/__init__.cpython-311.pyc differ diff --git a/config/__pycache__/settings.cpython-311.pyc b/config/__pycache__/settings.cpython-311.pyc index 0297352..376c9ea 100644 Binary files a/config/__pycache__/settings.cpython-311.pyc and b/config/__pycache__/settings.cpython-311.pyc differ diff --git a/config/__pycache__/urls.cpython-311.pyc b/config/__pycache__/urls.cpython-311.pyc index 6acc724..8155c69 100644 Binary files a/config/__pycache__/urls.cpython-311.pyc and b/config/__pycache__/urls.cpython-311.pyc differ diff --git a/config/__pycache__/wsgi.cpython-311.pyc b/config/__pycache__/wsgi.cpython-311.pyc index 8023075..7668992 100644 Binary files a/config/__pycache__/wsgi.cpython-311.pyc and b/config/__pycache__/wsgi.cpython-311.pyc differ diff --git a/core/__pycache__/admin.cpython-311.pyc b/core/__pycache__/admin.cpython-311.pyc index 6c07517..ca47b3f 100644 Binary files a/core/__pycache__/admin.cpython-311.pyc and b/core/__pycache__/admin.cpython-311.pyc differ diff --git a/core/__pycache__/api_views.cpython-311.pyc b/core/__pycache__/api_views.cpython-311.pyc index 9181153..e3f3118 100644 Binary files a/core/__pycache__/api_views.cpython-311.pyc and b/core/__pycache__/api_views.cpython-311.pyc differ diff --git a/core/__pycache__/apps.cpython-311.pyc b/core/__pycache__/apps.cpython-311.pyc index 143a227..2a51b07 100644 Binary files a/core/__pycache__/apps.cpython-311.pyc and b/core/__pycache__/apps.cpython-311.pyc differ diff --git a/core/__pycache__/context_processors.cpython-311.pyc b/core/__pycache__/context_processors.cpython-311.pyc index caf654d..3d3e632 100644 Binary files a/core/__pycache__/context_processors.cpython-311.pyc and b/core/__pycache__/context_processors.cpython-311.pyc differ diff --git a/core/__pycache__/forms.cpython-311.pyc b/core/__pycache__/forms.cpython-311.pyc index 36cc1a3..271f322 100644 Binary files a/core/__pycache__/forms.cpython-311.pyc and b/core/__pycache__/forms.cpython-311.pyc differ diff --git a/core/__pycache__/mail.cpython-311.pyc b/core/__pycache__/mail.cpython-311.pyc index 79d3c6a..7ecbdc5 100644 Binary files a/core/__pycache__/mail.cpython-311.pyc and b/core/__pycache__/mail.cpython-311.pyc differ diff --git a/core/__pycache__/models.cpython-311.pyc b/core/__pycache__/models.cpython-311.pyc index 0dfce24..22fa361 100644 Binary files a/core/__pycache__/models.cpython-311.pyc and b/core/__pycache__/models.cpython-311.pyc differ diff --git a/core/__pycache__/notifications.cpython-311.pyc b/core/__pycache__/notifications.cpython-311.pyc index 3d74643..5db409c 100644 Binary files a/core/__pycache__/notifications.cpython-311.pyc and b/core/__pycache__/notifications.cpython-311.pyc differ diff --git a/core/__pycache__/payment_utils.cpython-311.pyc b/core/__pycache__/payment_utils.cpython-311.pyc index e98bfe9..dc7c48b 100644 Binary files a/core/__pycache__/payment_utils.cpython-311.pyc and b/core/__pycache__/payment_utils.cpython-311.pyc differ diff --git a/core/__pycache__/pricing.cpython-311.pyc b/core/__pycache__/pricing.cpython-311.pyc index 979af60..6b81b64 100644 Binary files a/core/__pycache__/pricing.cpython-311.pyc and b/core/__pycache__/pricing.cpython-311.pyc differ diff --git a/core/__pycache__/serializers.cpython-311.pyc b/core/__pycache__/serializers.cpython-311.pyc index c4acfad..28acd13 100644 Binary files a/core/__pycache__/serializers.cpython-311.pyc and b/core/__pycache__/serializers.cpython-311.pyc differ diff --git a/core/__pycache__/urls.cpython-311.pyc b/core/__pycache__/urls.cpython-311.pyc index 7163804..5066ada 100644 Binary files a/core/__pycache__/urls.cpython-311.pyc and b/core/__pycache__/urls.cpython-311.pyc differ diff --git a/core/__pycache__/views.cpython-311.pyc b/core/__pycache__/views.cpython-311.pyc index c984148..289e221 100644 Binary files a/core/__pycache__/views.cpython-311.pyc and b/core/__pycache__/views.cpython-311.pyc differ diff --git a/core/__pycache__/whatsapp_utils.cpython-311.pyc b/core/__pycache__/whatsapp_utils.cpython-311.pyc index c244052..2c23081 100644 Binary files a/core/__pycache__/whatsapp_utils.cpython-311.pyc and b/core/__pycache__/whatsapp_utils.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0001_initial.cpython-311.pyc b/core/migrations/__pycache__/0001_initial.cpython-311.pyc index d3a915f..b13e6d7 100644 Binary files a/core/migrations/__pycache__/0001_initial.cpython-311.pyc and b/core/migrations/__pycache__/0001_initial.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0002_alter_parcel_options_alter_profile_options_and_more.cpython-311.pyc b/core/migrations/__pycache__/0002_alter_parcel_options_alter_profile_options_and_more.cpython-311.pyc index 3fb3a9a..0162c8d 100644 Binary files a/core/migrations/__pycache__/0002_alter_parcel_options_alter_profile_options_and_more.cpython-311.pyc and b/core/migrations/__pycache__/0002_alter_parcel_options_alter_profile_options_and_more.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0003_city_country_parcel_delivery_city_parcel_pickup_city_and_more.cpython-311.pyc b/core/migrations/__pycache__/0003_city_country_parcel_delivery_city_parcel_pickup_city_and_more.cpython-311.pyc index 2eca790..dcfe2e7 100644 Binary files a/core/migrations/__pycache__/0003_city_country_parcel_delivery_city_parcel_pickup_city_and_more.cpython-311.pyc and b/core/migrations/__pycache__/0003_city_country_parcel_delivery_city_parcel_pickup_city_and_more.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0004_parcel_payment_status_parcel_price_and_more.cpython-311.pyc b/core/migrations/__pycache__/0004_parcel_payment_status_parcel_price_and_more.cpython-311.pyc index b0bb0f6..f9d4666 100644 Binary files a/core/migrations/__pycache__/0004_parcel_payment_status_parcel_price_and_more.cpython-311.pyc and b/core/migrations/__pycache__/0004_parcel_payment_status_parcel_price_and_more.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0005_remove_city_name_remove_country_name_and_more.cpython-311.pyc b/core/migrations/__pycache__/0005_remove_city_name_remove_country_name_and_more.cpython-311.pyc index a16bc4e..7d8dc09 100644 Binary files a/core/migrations/__pycache__/0005_remove_city_name_remove_country_name_and_more.cpython-311.pyc and b/core/migrations/__pycache__/0005_remove_city_name_remove_country_name_and_more.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0006_alter_city_name_ar_alter_city_name_en_and_more.cpython-311.pyc b/core/migrations/__pycache__/0006_alter_city_name_ar_alter_city_name_en_and_more.cpython-311.pyc index e5f7c58..e1f0b53 100644 Binary files a/core/migrations/__pycache__/0006_alter_city_name_ar_alter_city_name_en_and_more.cpython-311.pyc and b/core/migrations/__pycache__/0006_alter_city_name_ar_alter_city_name_en_and_more.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0007_platformprofile.cpython-311.pyc b/core/migrations/__pycache__/0007_platformprofile.cpython-311.pyc index 6ffa3fe..55ae94e 100644 Binary files a/core/migrations/__pycache__/0007_platformprofile.cpython-311.pyc and b/core/migrations/__pycache__/0007_platformprofile.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0008_platformprofile_privacy_policy_and_more.cpython-311.pyc b/core/migrations/__pycache__/0008_platformprofile_privacy_policy_and_more.cpython-311.pyc index 8840b08..84c09ae 100644 Binary files a/core/migrations/__pycache__/0008_platformprofile_privacy_policy_and_more.cpython-311.pyc and b/core/migrations/__pycache__/0008_platformprofile_privacy_policy_and_more.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0009_profile_address_profile_profile_picture_and_more.cpython-311.pyc b/core/migrations/__pycache__/0009_profile_address_profile_profile_picture_and_more.cpython-311.pyc index 602a441..6577432 100644 Binary files a/core/migrations/__pycache__/0009_profile_address_profile_profile_picture_and_more.cpython-311.pyc and b/core/migrations/__pycache__/0009_profile_address_profile_profile_picture_and_more.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0010_platformprofile_whatsapp_access_token_and_more.cpython-311.pyc b/core/migrations/__pycache__/0010_platformprofile_whatsapp_access_token_and_more.cpython-311.pyc index 4629412..7308c05 100644 Binary files a/core/migrations/__pycache__/0010_platformprofile_whatsapp_access_token_and_more.cpython-311.pyc and b/core/migrations/__pycache__/0010_platformprofile_whatsapp_access_token_and_more.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0011_platformprofile_whatsapp_app_secret.cpython-311.pyc b/core/migrations/__pycache__/0011_platformprofile_whatsapp_app_secret.cpython-311.pyc index 5bff709..4fe86fe 100644 Binary files a/core/migrations/__pycache__/0011_platformprofile_whatsapp_app_secret.cpython-311.pyc and b/core/migrations/__pycache__/0011_platformprofile_whatsapp_app_secret.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0012_alter_platformprofile_whatsapp_access_token_and_more.cpython-311.pyc b/core/migrations/__pycache__/0012_alter_platformprofile_whatsapp_access_token_and_more.cpython-311.pyc index e37de1b..a4541d8 100644 Binary files a/core/migrations/__pycache__/0012_alter_platformprofile_whatsapp_access_token_and_more.cpython-311.pyc and b/core/migrations/__pycache__/0012_alter_platformprofile_whatsapp_access_token_and_more.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0013_platformprofile_enable_payment.cpython-311.pyc b/core/migrations/__pycache__/0013_platformprofile_enable_payment.cpython-311.pyc index eb8d412..9aeca13 100644 Binary files a/core/migrations/__pycache__/0013_platformprofile_enable_payment.cpython-311.pyc and b/core/migrations/__pycache__/0013_platformprofile_enable_payment.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0014_alter_otpverification_purpose.cpython-311.pyc b/core/migrations/__pycache__/0014_alter_otpverification_purpose.cpython-311.pyc index e25dc08..9a174e3 100644 Binary files a/core/migrations/__pycache__/0014_alter_otpverification_purpose.cpython-311.pyc and b/core/migrations/__pycache__/0014_alter_otpverification_purpose.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0015_testimonial.cpython-311.pyc b/core/migrations/__pycache__/0015_testimonial.cpython-311.pyc index 8a3b7fc..bf82026 100644 Binary files a/core/migrations/__pycache__/0015_testimonial.cpython-311.pyc and b/core/migrations/__pycache__/0015_testimonial.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0016_country_phone_code.cpython-311.pyc b/core/migrations/__pycache__/0016_country_phone_code.cpython-311.pyc index 7193d89..0e25152 100644 Binary files a/core/migrations/__pycache__/0016_country_phone_code.cpython-311.pyc and b/core/migrations/__pycache__/0016_country_phone_code.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0017_driverrating.cpython-311.pyc b/core/migrations/__pycache__/0017_driverrating.cpython-311.pyc index 61f33fd..50f9307 100644 Binary files a/core/migrations/__pycache__/0017_driverrating.cpython-311.pyc and b/core/migrations/__pycache__/0017_driverrating.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0018_alter_otpverification_purpose.cpython-311.pyc b/core/migrations/__pycache__/0018_alter_otpverification_purpose.cpython-311.pyc index 60072e6..db584ca 100644 Binary files a/core/migrations/__pycache__/0018_alter_otpverification_purpose.cpython-311.pyc and b/core/migrations/__pycache__/0018_alter_otpverification_purpose.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0019_profile_car_plate_number_profile_license_back_image_and_more.cpython-311.pyc b/core/migrations/__pycache__/0019_profile_car_plate_number_profile_license_back_image_and_more.cpython-311.pyc index ac07d52..6b9b7a7 100644 Binary files a/core/migrations/__pycache__/0019_profile_car_plate_number_profile_license_back_image_and_more.cpython-311.pyc and b/core/migrations/__pycache__/0019_profile_car_plate_number_profile_license_back_image_and_more.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0020_profile_is_approved.cpython-311.pyc b/core/migrations/__pycache__/0020_profile_is_approved.cpython-311.pyc index bbfac88..935f7aa 100644 Binary files a/core/migrations/__pycache__/0020_profile_is_approved.cpython-311.pyc and b/core/migrations/__pycache__/0020_profile_is_approved.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0021_remove_platformprofile_privacy_policy_and_more.cpython-311.pyc b/core/migrations/__pycache__/0021_remove_platformprofile_privacy_policy_and_more.cpython-311.pyc index b657091..99fcc89 100644 Binary files a/core/migrations/__pycache__/0021_remove_platformprofile_privacy_policy_and_more.cpython-311.pyc and b/core/migrations/__pycache__/0021_remove_platformprofile_privacy_policy_and_more.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0022_notificationtemplate.cpython-311.pyc b/core/migrations/__pycache__/0022_notificationtemplate.cpython-311.pyc index cf57370..798bc5b 100644 Binary files a/core/migrations/__pycache__/0022_notificationtemplate.cpython-311.pyc and b/core/migrations/__pycache__/0022_notificationtemplate.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0023_pricingrule_parcel_delivery_lat_parcel_delivery_lng_and_more.cpython-311.pyc b/core/migrations/__pycache__/0023_pricingrule_parcel_delivery_lat_parcel_delivery_lng_and_more.cpython-311.pyc index 3fb15ab..623567c 100644 Binary files a/core/migrations/__pycache__/0023_pricingrule_parcel_delivery_lat_parcel_delivery_lng_and_more.cpython-311.pyc and b/core/migrations/__pycache__/0023_pricingrule_parcel_delivery_lat_parcel_delivery_lng_and_more.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0024_platformprofile_auto_mark_paid.cpython-311.pyc b/core/migrations/__pycache__/0024_platformprofile_auto_mark_paid.cpython-311.pyc index 538526b..5611b16 100644 Binary files a/core/migrations/__pycache__/0024_platformprofile_auto_mark_paid.cpython-311.pyc and b/core/migrations/__pycache__/0024_platformprofile_auto_mark_paid.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0025_platformprofile_admin_panel_logo_and_more.cpython-311.pyc b/core/migrations/__pycache__/0025_platformprofile_admin_panel_logo_and_more.cpython-311.pyc index 74f277c..6de842e 100644 Binary files a/core/migrations/__pycache__/0025_platformprofile_admin_panel_logo_and_more.cpython-311.pyc and b/core/migrations/__pycache__/0025_platformprofile_admin_panel_logo_and_more.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0026_profile_bank_account_number.cpython-311.pyc b/core/migrations/__pycache__/0026_profile_bank_account_number.cpython-311.pyc index fcc0d35..d5f4372 100644 Binary files a/core/migrations/__pycache__/0026_profile_bank_account_number.cpython-311.pyc and b/core/migrations/__pycache__/0026_profile_bank_account_number.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0027_profile_driver_grade_profile_is_recommended.cpython-311.pyc b/core/migrations/__pycache__/0027_profile_driver_grade_profile_is_recommended.cpython-311.pyc index 19f9d8e..ca47a64 100644 Binary files a/core/migrations/__pycache__/0027_profile_driver_grade_profile_is_recommended.cpython-311.pyc and b/core/migrations/__pycache__/0027_profile_driver_grade_profile_is_recommended.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0028_platformprofile_accepting_shipments_and_more.cpython-311.pyc b/core/migrations/__pycache__/0028_platformprofile_accepting_shipments_and_more.cpython-311.pyc index 8a93b44..3c57504 100644 Binary files a/core/migrations/__pycache__/0028_platformprofile_accepting_shipments_and_more.cpython-311.pyc and b/core/migrations/__pycache__/0028_platformprofile_accepting_shipments_and_more.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0029_driverreport.cpython-311.pyc b/core/migrations/__pycache__/0029_driverreport.cpython-311.pyc index e3b8ba7..fd89a0c 100644 Binary files a/core/migrations/__pycache__/0029_driverreport.cpython-311.pyc and b/core/migrations/__pycache__/0029_driverreport.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0030_platformprofile_auto_ban_on_rejections_and_more.cpython-311.pyc b/core/migrations/__pycache__/0030_platformprofile_auto_ban_on_rejections_and_more.cpython-311.pyc index 829fa42..b35742b 100644 Binary files a/core/migrations/__pycache__/0030_platformprofile_auto_ban_on_rejections_and_more.cpython-311.pyc and b/core/migrations/__pycache__/0030_platformprofile_auto_ban_on_rejections_and_more.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0031_platformprofile_ticker_bg_color_and_more.cpython-311.pyc b/core/migrations/__pycache__/0031_platformprofile_ticker_bg_color_and_more.cpython-311.pyc index 949c5ef..0f61c6f 100644 Binary files a/core/migrations/__pycache__/0031_platformprofile_ticker_bg_color_and_more.cpython-311.pyc and b/core/migrations/__pycache__/0031_platformprofile_ticker_bg_color_and_more.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0032_parceltype_parcel_parcel_type.cpython-311.pyc b/core/migrations/__pycache__/0032_parceltype_parcel_parcel_type.cpython-311.pyc index 7344599..f09a17d 100644 Binary files a/core/migrations/__pycache__/0032_parceltype_parcel_parcel_type.cpython-311.pyc and b/core/migrations/__pycache__/0032_parceltype_parcel_parcel_type.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0033_platformprofile_enable_auto_ban_on_warnings_and_more.cpython-311.pyc b/core/migrations/__pycache__/0033_platformprofile_enable_auto_ban_on_warnings_and_more.cpython-311.pyc index 88bdf03..d7f4ee4 100644 Binary files a/core/migrations/__pycache__/0033_platformprofile_enable_auto_ban_on_warnings_and_more.cpython-311.pyc and b/core/migrations/__pycache__/0033_platformprofile_enable_auto_ban_on_warnings_and_more.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0034_profile_language.cpython-311.pyc b/core/migrations/__pycache__/0034_profile_language.cpython-311.pyc index 6b4d847..97846f2 100644 Binary files a/core/migrations/__pycache__/0034_profile_language.cpython-311.pyc and b/core/migrations/__pycache__/0034_profile_language.cpython-311.pyc differ diff --git a/core/templatetags/__pycache__/__init__.cpython-311.pyc b/core/templatetags/__pycache__/__init__.cpython-311.pyc index b088eae..fbe34eb 100644 Binary files a/core/templatetags/__pycache__/__init__.cpython-311.pyc and b/core/templatetags/__pycache__/__init__.cpython-311.pyc differ diff --git a/core/templatetags/__pycache__/core_tags.cpython-311.pyc b/core/templatetags/__pycache__/core_tags.cpython-311.pyc index 5041c44..850a874 100644 Binary files a/core/templatetags/__pycache__/core_tags.cpython-311.pyc and b/core/templatetags/__pycache__/core_tags.cpython-311.pyc differ diff --git a/core/templatetags/__pycache__/dashboard_stats.cpython-311.pyc b/core/templatetags/__pycache__/dashboard_stats.cpython-311.pyc index 193eeb1..f0e5540 100644 Binary files a/core/templatetags/__pycache__/dashboard_stats.cpython-311.pyc and b/core/templatetags/__pycache__/dashboard_stats.cpython-311.pyc differ diff --git a/core/templatetags/__pycache__/i18n_urls.cpython-311.pyc b/core/templatetags/__pycache__/i18n_urls.cpython-311.pyc index 867aa56..19b10d8 100644 Binary files a/core/templatetags/__pycache__/i18n_urls.cpython-311.pyc and b/core/templatetags/__pycache__/i18n_urls.cpython-311.pyc differ diff --git a/core/views.py b/core/views.py index fc93cfa..eb5dd3a 100644 --- a/core/views.py +++ b/core/views.py @@ -855,6 +855,9 @@ def chatbot(request): else: system_prompt += " The user is currently browsing in English." + import logging + logger = logging.getLogger(__name__) + logger.info(f'Chatbot request: {user_message}') response = LocalAIApi.create_response({ "input": [ {"role": "system", "content": system_prompt}, @@ -862,6 +865,7 @@ def chatbot(request): ] }) + logger.info(f'Chatbot response: {response}') if response.get("success"): text = LocalAIApi.extract_text(response) return JsonResponse({"success": True, "response": text})