Przeglądaj źródła

修复ppo读取不到数据

lxylxy123321 23 godzin temu
rodzic
commit
4db9895e45
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      backend/app/preprocessors/__init__.py

+ 2 - 2
backend/app/preprocessors/__init__.py

@@ -101,8 +101,8 @@ def apply_sharegpt_template(item: dict) -> dict:
 
 
 def apply_raw_template(item: dict) -> dict:
-    """Raw 模板: 直接读取 prompt/text 和 completion/output 字段。"""
-    prompt = item.get("prompt", item.get("text", item.get("input", item.get("question", item.get("query", "")))))
+    """Raw 模板: 直接读取 prompt/instruction/text 和 completion/output 字段。"""
+    prompt = item.get("prompt", item.get("instruction", item.get("text", item.get("input", item.get("question", item.get("query", ""))))))
     completion = item.get("completion", item.get("output", item.get("target", item.get("answer", item.get("response", "")))))
     return {"prompt": str(prompt), "completion": str(completion)}