fix the CLI issue

This commit is contained in:
SmartDever02 2025-12-03 07:14:40 -03:00
parent e300873288
commit eaa38d6a7f
2 changed files with 4 additions and 6 deletions

View file

@ -80,14 +80,13 @@ Connection Lifecycle:
import logging import logging
import json import json
import os from quart import websocket
from quart import websocket, request as quart_request
from itsdangerous.url_safe import URLSafeTimedSerializer as Serializer from itsdangerous.url_safe import URLSafeTimedSerializer as Serializer
from api.db.db_models import APIToken from api.db.db_models import APIToken
from api.db.services.user_service import UserService from api.db.services.user_service import UserService
from api.db.services.dialog_service import DialogService from api.db.services.dialog_service import DialogService
from api.db.services.conversation_service import ConversationService, completion from api.db.services.conversation_service import completion
from common.constants import StatusEnum from common.constants import StatusEnum
from common import settings from common import settings
@ -398,7 +397,7 @@ async def websocket_chat():
try: try:
await send_error(error_message) await send_error(error_message)
except: except Exception:
# Failed to send error (connection may be closed) # Failed to send error (connection may be closed)
pass pass
@ -634,7 +633,7 @@ async def websocket_agent():
try: try:
await send_error(error_message) await send_error(error_message)
except: except Exception:
pass pass
await websocket.close(1011, "Internal server error") await websocket.close(1011, "Internal server error")

View file

@ -33,7 +33,6 @@ Usage:
import argparse import argparse
import json import json
import sys
import threading import threading
import websocket import websocket