|
@@ -1,6 +1,7 @@
|
|
#! /usr/bin/env python
|
|
#! /usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
# -*- coding: utf-8 -*-
|
|
# vim:fenc=utf-8
|
|
# vim:fenc=utf-8
|
|
|
|
+import json
|
|
import random
|
|
import random
|
|
from enum import Enum
|
|
from enum import Enum
|
|
from typing import Dict, List, Optional, Tuple, Any
|
|
from typing import Dict, List, Optional, Tuple, Any
|
|
@@ -14,6 +15,7 @@ import cozepy
|
|
from sqlalchemy.orm import sessionmaker, Session
|
|
from sqlalchemy.orm import sessionmaker, Session
|
|
|
|
|
|
from pqai_agent import configs
|
|
from pqai_agent import configs
|
|
|
|
+from pqai_agent.clients.hot_topic_client import hot_topic_client
|
|
from pqai_agent.clients.relation_stage_client import RelationStageClient
|
|
from pqai_agent.clients.relation_stage_client import RelationStageClient
|
|
from pqai_agent.data_models.agent_push_record import AgentPushRecord
|
|
from pqai_agent.data_models.agent_push_record import AgentPushRecord
|
|
from pqai_agent.logging import logger
|
|
from pqai_agent.logging import logger
|
|
@@ -572,6 +574,7 @@ class DialogueManager:
|
|
"relation_stage": self.relation_stage,
|
|
"relation_stage": self.relation_stage,
|
|
"formatted_staff_profile": prompt_utils.format_agent_profile_v2(self.staff_profile),
|
|
"formatted_staff_profile": prompt_utils.format_agent_profile_v2(self.staff_profile),
|
|
"formatted_user_profile": prompt_utils.format_user_profile(self.user_profile),
|
|
"formatted_user_profile": prompt_utils.format_user_profile(self.user_profile),
|
|
|
|
+ "hot_topics": json.dumps(hot_topic_client.get_hot_topics(), indent=2, ensure_ascii=False),
|
|
**self.user_profile,
|
|
**self.user_profile,
|
|
**legacy_staff_profile
|
|
**legacy_staff_profile
|
|
}
|
|
}
|