Spaces:
Paused
Paused
Update chat_handler_debug.py
Browse files- chat_handler_debug.py +2 -2
chat_handler_debug.py
CHANGED
|
@@ -3,7 +3,7 @@ from fastapi.responses import JSONResponse
|
|
| 3 |
import traceback, random
|
| 4 |
from intent import extract_parameters, validate_variable_formats, detect_intent
|
| 5 |
from intent_api import execute_intent
|
| 6 |
-
from llm_model import generate_response,
|
| 7 |
from log import log
|
| 8 |
|
| 9 |
DEBUG = True
|
|
@@ -25,7 +25,7 @@ async def handle_chat(msg: Message, request: Request, app, s_config):
|
|
| 25 |
})
|
| 26 |
|
| 27 |
try:
|
| 28 |
-
if
|
| 29 |
return {"error": "Model yüklenmedi."}
|
| 30 |
|
| 31 |
# === INTENT TESPİTİ ===
|
|
|
|
| 3 |
import traceback, random
|
| 4 |
from intent import extract_parameters, validate_variable_formats, detect_intent
|
| 5 |
from intent_api import execute_intent
|
| 6 |
+
from llm_model import generate_response, get_model, get_tokenizer, Message
|
| 7 |
from log import log
|
| 8 |
|
| 9 |
DEBUG = True
|
|
|
|
| 25 |
})
|
| 26 |
|
| 27 |
try:
|
| 28 |
+
if get_model() is None or get_tokenizer() is None:
|
| 29 |
return {"error": "Model yüklenmedi."}
|
| 30 |
|
| 31 |
# === INTENT TESPİTİ ===
|