diff --git a/bot.py b/bot.py index 964510f..4f69b61 100644 --- a/bot.py +++ b/bot.py @@ -62,6 +62,12 @@ def process_fn( """ references = item.get("references", []) + # check if references is a string + if isinstance(references, str): + references = [references] + # filter out empty strings + references = [ref for ref in references if ref] + model = item["model"] messages = item["instruction"]