|
@@ -150,7 +150,9 @@ class DialogueManager:
|
|
self.current_state, self.previous_state = self.state_cache.get_state(self.staff_id, self.user_id)
|
|
self.current_state, self.previous_state = self.state_cache.get_state(self.staff_id, self.user_id)
|
|
|
|
|
|
# 从数据库恢复对话状态
|
|
# 从数据库恢复对话状态
|
|
- self.dialogue_history = self.history_dialogue_service.get_dialogue_history(self.staff_id, self.user_id)
|
|
|
|
|
|
+ minutes_to_get = 5 * 24 * 60
|
|
|
|
+ self.dialogue_history = self.history_dialogue_service.get_dialogue_history(
|
|
|
|
+ self.staff_id, self.user_id, minutes_to_get)
|
|
if self.dialogue_history:
|
|
if self.dialogue_history:
|
|
self.last_interaction_time = self.dialogue_history[-1]['timestamp']
|
|
self.last_interaction_time = self.dialogue_history[-1]['timestamp']
|
|
if self.current_state == DialogueState.MESSAGE_AGGREGATING:
|
|
if self.current_state == DialogueState.MESSAGE_AGGREGATING:
|
|
@@ -476,7 +478,6 @@ class DialogueManager:
|
|
|
|
|
|
current_datetime = datetime.now()
|
|
current_datetime = datetime.now()
|
|
context = {
|
|
context = {
|
|
- "user_profile": self.user_profile,
|
|
|
|
"current_state": self.current_state.name,
|
|
"current_state": self.current_state.name,
|
|
"previous_state": self.previous_state.name,
|
|
"previous_state": self.previous_state.name,
|
|
"current_time_period": time_context.description,
|
|
"current_time_period": time_context.description,
|