|
@@ -174,7 +174,8 @@ class AgentService:
|
|
"""处理LLM响应"""
|
|
"""处理LLM响应"""
|
|
chat_config = agent.build_chat_configuration(user_message, self.chat_service_type)
|
|
chat_config = agent.build_chat_configuration(user_message, self.chat_service_type)
|
|
logging.debug(chat_config)
|
|
logging.debug(chat_config)
|
|
- chat_response = self._call_chat_api(chat_config)
|
|
|
|
|
|
+ # FIXME(zhoutian): 临时处理去除头尾的空格
|
|
|
|
+ chat_response = self._call_chat_api(chat_config).strip()
|
|
|
|
|
|
if response := agent.generate_response(chat_response):
|
|
if response := agent.generate_response(chat_response):
|
|
logging.warning("user: {}, response: {}".format(user_id, response))
|
|
logging.warning("user: {}, response: {}".format(user_id, response))
|