|
@@ -178,12 +178,14 @@ class AgentService:
|
|
|
chat_response = self._call_chat_api(chat_config).strip()
|
|
|
|
|
|
if response := agent.generate_response(chat_response):
|
|
|
- logging.warning("user: {}, response: {}".format(user_id, response))
|
|
|
+ logging.warning(f"staff[{agent.staff_id}] user[{user_id}]: response: {response}")
|
|
|
current_ts = int(time.time() * 1000)
|
|
|
self.send_queue.produce(
|
|
|
Message.build(MessageType.TEXT, MessageChannel.CORP_WECHAT,
|
|
|
agent.staff_id, user_id, response, current_ts)
|
|
|
)
|
|
|
+ else:
|
|
|
+ logging.warning(f"staff[{agent.staff_id}] user[{user_id}]: no response generated")
|
|
|
|
|
|
def _call_chat_api(self, chat_config: Dict) -> str:
|
|
|
if configs.get().get('debug_flags', {}).get('disable_llm_api_call', False):
|