Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ from datetime import datetime
|
|
| 6 |
from typing import Literal
|
| 7 |
import os
|
| 8 |
import importlib
|
| 9 |
-
from llm_handler import
|
| 10 |
from main import generate_data, PROMPT_1
|
| 11 |
from topics import TOPICS
|
| 12 |
from system_messages import SYSTEM_MESSAGES_VODALUS
|
|
@@ -469,12 +469,8 @@ def chat_with_llm(message, history):
|
|
| 469 |
msg_list.append({"role": "assistant", "content": h[1]})
|
| 470 |
msg_list.append({"role": "user", "content": message})
|
| 471 |
|
| 472 |
-
|
| 473 |
-
|
| 474 |
-
return history + [[message, response]]
|
| 475 |
-
except Exception as e:
|
| 476 |
-
print(f"Error in chat_with_llm: {str(e)}")
|
| 477 |
-
return history + [[message, f"Error: {str(e)}"]]
|
| 478 |
|
| 479 |
return history + [[message, response]]
|
| 480 |
except Exception as e:
|
|
|
|
| 6 |
from typing import Literal
|
| 7 |
import os
|
| 8 |
import importlib
|
| 9 |
+
from llm_handler import send_to_llm_wrapper
|
| 10 |
from main import generate_data, PROMPT_1
|
| 11 |
from topics import TOPICS
|
| 12 |
from system_messages import SYSTEM_MESSAGES_VODALUS
|
|
|
|
| 469 |
msg_list.append({"role": "assistant", "content": h[1]})
|
| 470 |
msg_list.append({"role": "user", "content": message})
|
| 471 |
|
| 472 |
+
# Update this line to use send_to_llm_wrapper
|
| 473 |
+
response, _ = send_to_llm_wrapper(msg_list)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 474 |
|
| 475 |
return history + [[message, response]]
|
| 476 |
except Exception as e:
|