Update app.py
Browse files
app.py
CHANGED
@@ -268,7 +268,7 @@ def generate_response():
|
|
268 |
for message in messages:
|
269 |
if message.get("from") == "assistant":
|
270 |
message_tokens = get_message_tokens(model=model, role="bot", content=message.get("content", ""))
|
271 |
-
|
272 |
message_tokens = get_message_tokens(model=model, role="system", content=message.get("content", ""))
|
273 |
else:
|
274 |
message_tokens = get_message_tokens(model=model, role="user", content=message.get("content", ""))
|
|
|
268 |
for message in messages:
|
269 |
if message.get("from") == "assistant":
|
270 |
message_tokens = get_message_tokens(model=model, role="bot", content=message.get("content", ""))
|
271 |
+
elif message.get("from") == "system":
|
272 |
message_tokens = get_message_tokens(model=model, role="system", content=message.get("content", ""))
|
273 |
else:
|
274 |
message_tokens = get_message_tokens(model=model, role="user", content=message.get("content", ""))
|