support conversation

This commit is contained in:
2025-10-29 16:08:58 +08:00
parent 703e429293
commit df7468ea9f

View File

@@ -90,7 +90,15 @@ class Validator:
# NOTE: for every dataset; need one of these # NOTE: for every dataset; need one of these
def default_inp_parse(self, inp, pipeline:Pipeline): def default_inp_parse(self, inp, pipeline:Pipeline):
inp = inp["text"] inp = inp["text"]
return pipeline.chat(inp, as_raw=True)
if isinstance(inp, str):
inp = [inp]
outs = []
for usr_inp in inp:
outs.extend(pipeline.chat(usr_inp, as_raw=True))
return outs
def get_val_fnc(self, dataset_name:str)->List[Callable]: def get_val_fnc(self, dataset_name:str)->List[Callable]: