From e9f690be138929ed531099ff530740238a77f208 Mon Sep 17 00:00:00 2001 From: D C Date: Sat, 14 Dec 2024 12:58:30 +0100 Subject: [PATCH] Views --- dropship_project/views.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dropship_project/views.py b/dropship_project/views.py index c728bbc8..8b8f6f1a 100644 --- a/dropship_project/views.py +++ b/dropship_project/views.py @@ -83,9 +83,7 @@ def post(self, request): response = generate_response(user_query) # Placeholder for AI response generation return JsonResponse({'response': response}) -def generate_response(query): - # Placeholder function for generating AI responses - return "This is a placeholder response for your query: " + query +# Remove duplicate function definition def post(self, request): user_query = request.POST.get('query', '') @@ -97,7 +95,8 @@ def generate_response(query): return "This is a placeholder response for your query: " + queryimport # type: ignore # Create a logger -logger = login.getLogger(__name__) +import logging +logger = logging.getLogger(__name__) # Set the logging level logger.setLevel(login.INFO)