Update app.py
Browse files
app.py
CHANGED
@@ -59,13 +59,9 @@ def call_nvidia_api(history, max_tokens, temperature, top_p):
|
|
59 |
return history
|
60 |
|
61 |
|
62 |
-
def update_chatbot(message, chat_history):
|
63 |
"""Updates the chatbot with the user message and generates a response."""
|
64 |
print("Updating chatbot...")
|
65 |
-
system_message = system_msg.value # Get values from components
|
66 |
-
max_tokens_val = max_tokens.value
|
67 |
-
temperature_val = temperature.value
|
68 |
-
top_p_val = top_p.value
|
69 |
|
70 |
if not chat_history or (chat_history and chat_history[-1]["role"] != "user"):
|
71 |
chat_history = user(message, chat_history, system_message)
|
|
|
59 |
return history
|
60 |
|
61 |
|
62 |
+
def update_chatbot(message, chat_history, system_message, max_tokens_val, temperature_val, top_p_val):
|
63 |
"""Updates the chatbot with the user message and generates a response."""
|
64 |
print("Updating chatbot...")
|
|
|
|
|
|
|
|
|
65 |
|
66 |
if not chat_history or (chat_history and chat_history[-1]["role"] != "user"):
|
67 |
chat_history = user(message, chat_history, system_message)
|