Browse Source

Update push_service: fix apollo tag getting

StrayWarrior 1 tháng trước cách đây
mục cha
commit
5cbfbc48a6
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      pqai_agent/push_service.py

+ 1 - 1
pqai_agent/push_service.py

@@ -142,7 +142,7 @@ class PushTaskWorkerPool:
                 return
             content = task['content']
             recent_dialogue = agent.dialogue_history[-10:]
-            agent_voice_whitelist = set(apollo_config.get_json_value("agent_voice_whitelist"))
+            agent_voice_whitelist = set(apollo_config.get_json_value("agent_voice_whitelist", []))
             # FIXME(zhoutian): 不应该再由agent控制,或者agent和API共享同一配置
             if len(recent_dialogue) < 2 or staff_id not in agent_voice_whitelist:
                 message_type = MessageType.TEXT