fix:修复表达方式空构建问题
This commit is contained in:
@@ -204,7 +204,8 @@ class ExpressionLearner:
|
||||
random_msg: Optional[List[Dict[str, Any]]] = get_raw_msg_by_timestamp_random(
|
||||
current_time - 3600 * 24, current_time, limit=num
|
||||
)
|
||||
if not random_msg:
|
||||
# print(random_msg)
|
||||
if not random_msg or random_msg == []:
|
||||
return None
|
||||
# 转化成str
|
||||
chat_id: str = random_msg[0]["chat_id"]
|
||||
@@ -216,7 +217,7 @@ class ExpressionLearner:
|
||||
chat_str=random_msg_str,
|
||||
)
|
||||
|
||||
# logger.info(f"学习{type_str}的prompt: {prompt}")
|
||||
logger.info(f"学习{type_str}的prompt: {prompt}")
|
||||
|
||||
try:
|
||||
response, _ = await self.express_learn_model.generate_response_async(prompt)
|
||||
|
||||
Reference in New Issue
Block a user