Spaces:
Running
Running
Commit
·
f7a66e6
1
Parent(s):
a897a27
final update
Browse files
main.py
CHANGED
@@ -674,7 +674,7 @@ class HealthcareChatbot:
|
|
674 |
print(f"🎯 Router Decision: {router_data}")
|
675 |
|
676 |
# Step 3: Handle based on intent
|
677 |
-
if router_data["intent"] == "CONVERSATION":
|
678 |
print(f"\n💬 Handling as CONVERSATION")
|
679 |
response_text = self.handle_conversation(user_message, detected_language, sentiment_result)
|
680 |
|
@@ -722,7 +722,8 @@ class HealthcareChatbot:
|
|
722 |
response_type="api_action",
|
723 |
message=api_result["response"],
|
724 |
api_call_made=True,
|
725 |
-
api_data=api_result["api_data"]
|
|
|
726 |
language=detected_language
|
727 |
)
|
728 |
|
|
|
674 |
print(f"🎯 Router Decision: {router_data}")
|
675 |
|
676 |
# Step 3: Handle based on intent
|
677 |
+
if router_data["intent"] == "CONVERSATION" and router_data['endpoint'] is None:
|
678 |
print(f"\n💬 Handling as CONVERSATION")
|
679 |
response_text = self.handle_conversation(user_message, detected_language, sentiment_result)
|
680 |
|
|
|
722 |
response_type="api_action",
|
723 |
message=api_result["response"],
|
724 |
api_call_made=True,
|
725 |
+
# api_data=api_result["api_data"]
|
726 |
+
# api_data=json.dumps(api_result["api_data"]) if 'action_result' in api_result else None,
|
727 |
language=detected_language
|
728 |
)
|
729 |
|