Update funcs.py
Browse files
funcs.py
CHANGED
@@ -101,18 +101,18 @@ def summarize_and_recommend(therapy_session_conversation):
|
|
101 |
print("tcs:", therapy_session_conversation, type(therapy_session_conversation))
|
102 |
|
103 |
session_time = str(datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
|
104 |
-
|
105 |
-
print(type(
|
106 |
-
|
107 |
|
108 |
# session_conversation_processed = [session_time] + therapy_session_conversation
|
109 |
# session_conversation_processed = session_conversation.copy()
|
110 |
# session_conversation_processed.insert(0, "Session_time: "+session_time)
|
111 |
# session_conversation_processed ='\n'.join(session_conversation_processed)
|
112 |
|
113 |
-
|
114 |
|
115 |
-
session_conversation_processed ='\n'.join(
|
116 |
print("session_conversation_processed:", session_conversation_processed)
|
117 |
|
118 |
full_summary = ""
|
@@ -159,8 +159,8 @@ def summarize_and_recommend(therapy_session_conversation):
|
|
159 |
full_recommendations = full_recommendations.replace('User:', '').strip()
|
160 |
print("\n")
|
161 |
print("Full recommendations:", full_recommendations)
|
162 |
-
|
163 |
-
return full_summary, full_recommendations
|
164 |
|
165 |
|
166 |
|
|
|
101 |
print("tcs:", therapy_session_conversation, type(therapy_session_conversation))
|
102 |
|
103 |
session_time = str(datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
|
104 |
+
session_conversation = [item[0] for item in therapy_session_conversation]
|
105 |
+
print(type(session_conversation), session_conversation)
|
106 |
+
session_conversation = session_conversation[1:]
|
107 |
|
108 |
# session_conversation_processed = [session_time] + therapy_session_conversation
|
109 |
# session_conversation_processed = session_conversation.copy()
|
110 |
# session_conversation_processed.insert(0, "Session_time: "+session_time)
|
111 |
# session_conversation_processed ='\n'.join(session_conversation_processed)
|
112 |
|
113 |
+
session_conversation.insert(0, "Session_time: "+session_time)
|
114 |
|
115 |
+
session_conversation_processed ='\n'.join(session_conversation)
|
116 |
print("session_conversation_processed:", session_conversation_processed)
|
117 |
|
118 |
full_summary = ""
|
|
|
159 |
full_recommendations = full_recommendations.replace('User:', '').strip()
|
160 |
print("\n")
|
161 |
print("Full recommendations:", full_recommendations)
|
162 |
+
chatbox=[]
|
163 |
+
return full_summary, full_recommendations, chatbox
|
164 |
|
165 |
|
166 |
|