Merge branch 'dev' of https://github.com/MaiM-with-u/MaiBot into dev
This commit is contained in:
@@ -326,7 +326,7 @@ def random_remove_punctuation(text: str) -> str:
|
||||
def process_llm_response(text: str) -> List[str]:
|
||||
# processed_response = process_text_with_typos(content)
|
||||
# 对西文字符段落的回复长度设置为汉字字符的两倍
|
||||
max_length = global_config.response_max_length *3
|
||||
max_length = global_config.response_max_length * 3
|
||||
max_sentence_num = global_config.response_max_sentence_num
|
||||
if len(text) > max_length and not is_western_paragraph(text):
|
||||
logger.warning(f"回复过长 ({len(text)} 字符),返回默认回复")
|
||||
|
||||
@@ -138,6 +138,7 @@ class LLMStatistics:
|
||||
# user_id = str(doc.get("user_info", {}).get("user_id", "unknown"))
|
||||
chat_info = doc.get("chat_info", {})
|
||||
user_info = doc.get("user_info", {})
|
||||
user_id = str(user_info.get("user_id", "unknown"))
|
||||
message_time = doc.get("time", 0)
|
||||
group_info = chat_info.get("group_info") if chat_info else {}
|
||||
# print(f"group_info: {group_info}")
|
||||
|
||||
Reference in New Issue
Block a user