Simplify logs
Browse files
app.py
CHANGED
|
@@ -91,7 +91,7 @@ async def interact_with_langchain_agent(user_prompt, messages, session_id, histo
|
|
| 91 |
yield messages, historic_data_state, vin_data_state, dtc_data_state
|
| 92 |
return
|
| 93 |
|
| 94 |
-
print("
|
| 95 |
messages.append(ChatMessage(role="user", content=user_prompt))
|
| 96 |
yield messages, historic_data_state, vin_data_state, dtc_data_state
|
| 97 |
|
|
@@ -101,7 +101,7 @@ async def interact_with_langchain_agent(user_prompt, messages, session_id, histo
|
|
| 101 |
messages.append(ChatMessage(role="assistant", content=error_msg))
|
| 102 |
yield messages, historic_data_state, vin_data_state, dtc_data_state
|
| 103 |
return
|
| 104 |
-
print("Agent is available, processing the request...")
|
| 105 |
|
| 106 |
try:
|
| 107 |
assistant_response = "" # Collect assistant's full response
|
|
@@ -118,7 +118,7 @@ async def interact_with_langchain_agent(user_prompt, messages, session_id, histo
|
|
| 118 |
stream_mode="messages"
|
| 119 |
):
|
| 120 |
node = metadata.get("langgraph_node", "unknown")
|
| 121 |
-
print(f"Token from node {node}: {message_chunk}")
|
| 122 |
|
| 123 |
# Only process chunks from the model node (AI responses)
|
| 124 |
if node == "model":
|
|
@@ -450,7 +450,7 @@ def update_vin_dataframe(vin_data_state):
|
|
| 450 |
def create_plot(data):
|
| 451 |
|
| 452 |
if data is None or len(data) == 0:
|
| 453 |
-
print("No historic data to plot.")
|
| 454 |
return None
|
| 455 |
|
| 456 |
print("Creating plot with data:", data)
|
|
@@ -481,7 +481,7 @@ def create_plot(data):
|
|
| 481 |
|
| 482 |
def update_dtc(dtc_data):
|
| 483 |
if dtc_data is None or len(dtc_data) == 0:
|
| 484 |
-
print("No DTC data to update.")
|
| 485 |
return []
|
| 486 |
|
| 487 |
print("Updating DTC component with data:", dtc_data)
|
|
|
|
| 91 |
yield messages, historic_data_state, vin_data_state, dtc_data_state
|
| 92 |
return
|
| 93 |
|
| 94 |
+
print("> ", user_prompt)
|
| 95 |
messages.append(ChatMessage(role="user", content=user_prompt))
|
| 96 |
yield messages, historic_data_state, vin_data_state, dtc_data_state
|
| 97 |
|
|
|
|
| 101 |
messages.append(ChatMessage(role="assistant", content=error_msg))
|
| 102 |
yield messages, historic_data_state, vin_data_state, dtc_data_state
|
| 103 |
return
|
| 104 |
+
# print("Agent is available, processing the request...")
|
| 105 |
|
| 106 |
try:
|
| 107 |
assistant_response = "" # Collect assistant's full response
|
|
|
|
| 118 |
stream_mode="messages"
|
| 119 |
):
|
| 120 |
node = metadata.get("langgraph_node", "unknown")
|
| 121 |
+
# print(f"Token from node {node}: {message_chunk}")
|
| 122 |
|
| 123 |
# Only process chunks from the model node (AI responses)
|
| 124 |
if node == "model":
|
|
|
|
| 450 |
def create_plot(data):
|
| 451 |
|
| 452 |
if data is None or len(data) == 0:
|
| 453 |
+
# print("No historic data to plot.")
|
| 454 |
return None
|
| 455 |
|
| 456 |
print("Creating plot with data:", data)
|
|
|
|
| 481 |
|
| 482 |
def update_dtc(dtc_data):
|
| 483 |
if dtc_data is None or len(dtc_data) == 0:
|
| 484 |
+
# print("No DTC data to update.")
|
| 485 |
return []
|
| 486 |
|
| 487 |
print("Updating DTC component with data:", dtc_data)
|