fix(chat): 修复 kaomoji 恢复函数的参数类型
在之前的重构中,`recover_kaomoji` 函数的调用被简化,但在此处调用时忘记移除数组包裹,导致传递了错误的参数类型。此提交删除了多余的方括号,确保将字符串直接传递给 `recover_kaomoji` 函数。
This commit is contained in:
committed by
Windpicker-owo
parent
2784e59a36
commit
304fc9f74c
@@ -374,7 +374,7 @@ def process_llm_response(
|
|||||||
s["correction"] = recover_kaomoji(s["correction"], kaomoji_mapping)
|
s["correction"] = recover_kaomoji(s["correction"], kaomoji_mapping)
|
||||||
recovered_sentences.append(s)
|
recovered_sentences.append(s)
|
||||||
elif isinstance(s, dict) and s.get("type") == "text":
|
elif isinstance(s, dict) and s.get("type") == "text":
|
||||||
s["content"] = recover_kaomoji([s["content"]], kaomoji_mapping)
|
s["content"] = recover_kaomoji(s["content"], kaomoji_mapping)
|
||||||
recovered_sentences.append(s)
|
recovered_sentences.append(s)
|
||||||
else:
|
else:
|
||||||
recovered_sentences.append(recover_kaomoji([s], kaomoji_mapping))
|
recovered_sentences.append(recover_kaomoji([s], kaomoji_mapping))
|
||||||
|
|||||||
Reference in New Issue
Block a user