Spaces:
Running
Running
Fix turns logging
Browse files
app.py
CHANGED
|
@@ -116,8 +116,8 @@ def run_chat_inference(history, message, state):
|
|
| 116 |
return history, INPUT_ENABLED, SEND_BUTTON_ENABLED, STOP_BUTTON_DISABLED, BUTTON_ENABLED, state
|
| 117 |
|
| 118 |
chat_start_count = chat_start_count + 1
|
| 119 |
-
|
| 120 |
-
|
| 121 |
|
| 122 |
is_reasoning = model_config.get("REASONING")
|
| 123 |
|
|
|
|
| 116 |
return history, INPUT_ENABLED, SEND_BUTTON_ENABLED, STOP_BUTTON_DISABLED, BUTTON_ENABLED, state
|
| 117 |
|
| 118 |
chat_start_count = chat_start_count + 1
|
| 119 |
+
user_messages_count = sum(1 for item in history if isinstance(item, dict) and item.get("role") == "user")
|
| 120 |
+
log_info(f"chat_start_count: {chat_start_count}, turns: {user_messages_count}, model: {model_name}")
|
| 121 |
|
| 122 |
is_reasoning = model_config.get("REASONING")
|
| 123 |
|