remove print and logs
Browse files- agent_manager/__init__.py +0 -1
- api/views.py +0 -4
agent_manager/__init__.py
CHANGED
|
@@ -103,7 +103,6 @@ class StructuredChatWrapper(BaseChatModel):
|
|
| 103 |
|
| 104 |
# 🔹 Run structured model only for valid task types
|
| 105 |
structured_response = self._structured_model.invoke(input_text)
|
| 106 |
-
print(structured_response)
|
| 107 |
|
| 108 |
if (structured_response['task_type'] == 'invalid' or structured_response['task_type'] == 'follow-up'):
|
| 109 |
json_content = structured_response['output']
|
|
|
|
| 103 |
|
| 104 |
# 🔹 Run structured model only for valid task types
|
| 105 |
structured_response = self._structured_model.invoke(input_text)
|
|
|
|
| 106 |
|
| 107 |
if (structured_response['task_type'] == 'invalid' or structured_response['task_type'] == 'follow-up'):
|
| 108 |
json_content = structured_response['output']
|
api/views.py
CHANGED
|
@@ -4,7 +4,6 @@ from rest_framework.permissions import AllowAny
|
|
| 4 |
from rest_framework.response import Response
|
| 5 |
from rest_framework import status
|
| 6 |
from agent_manager import get_or_create_agent, end_session, get_message_list
|
| 7 |
-
import logging
|
| 8 |
|
| 9 |
@csrf_exempt
|
| 10 |
@permission_classes([AllowAny])
|
|
@@ -17,11 +16,8 @@ def hello(request):
|
|
| 17 |
@api_view(['POST'])
|
| 18 |
def chat(request):
|
| 19 |
"""Start or continue an existing chat session."""
|
| 20 |
-
logging.getLogger(__name__).info(f"Received a chat request.")
|
| 21 |
chat_session = request.data.get("chatSession")
|
| 22 |
message = request.data.get("message")
|
| 23 |
-
logging.getLogger(__name__).info(f"Received message: {message}")
|
| 24 |
-
|
| 25 |
|
| 26 |
if not message:
|
| 27 |
return Response({
|
|
|
|
| 4 |
from rest_framework.response import Response
|
| 5 |
from rest_framework import status
|
| 6 |
from agent_manager import get_or_create_agent, end_session, get_message_list
|
|
|
|
| 7 |
|
| 8 |
@csrf_exempt
|
| 9 |
@permission_classes([AllowAny])
|
|
|
|
| 16 |
@api_view(['POST'])
|
| 17 |
def chat(request):
|
| 18 |
"""Start or continue an existing chat session."""
|
|
|
|
| 19 |
chat_session = request.data.get("chatSession")
|
| 20 |
message = request.data.get("message")
|
|
|
|
|
|
|
| 21 |
|
| 22 |
if not message:
|
| 23 |
return Response({
|