fix(chinese-instruct.py): 修复输入为空时 build_prompt 报错问题

This commit is contained in:
2025-07-21 13:09:54 +08:00
parent 1ef14a997e
commit 56b64ab8c3
+2 -2
View File
@@ -19,8 +19,8 @@ def build_prompt(query:str, response:str) -> str:
def process_func(input_dict: dict): def process_func(input_dict: dict):
query = input_dict["prompt"] query = input_dict["prompt"] if input_dict["prompt"] else ""
response = input_dict["response"] response = input_dict["response"] if input_dict["response"] else ""
return {"text": build_prompt(query, response)} return {"text": build_prompt(query, response)}