diff --git a/.vscode/settings.json b/.vscode/settings.json index a24173d..edc242e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,5 @@ { - "python.testing.pytestArgs": [ - "scripts" - ], + "python.testing.pytestArgs": ["tests"], "python.testing.unittestEnabled": false, "python.testing.pytestEnabled": true, "files.exclude": { diff --git a/src/evaltools/eval/evaluate.py b/src/evaltools/eval/evaluate.py index ba2f446..080ca95 100755 --- a/src/evaltools/eval/evaluate.py +++ b/src/evaltools/eval/evaluate.py @@ -49,9 +49,11 @@ def send_question_to_target( context = json.dumps(data_points, ensure_ascii=False) elif isinstance(data_points, list): context = "\n\n".join(data_points) - else: + elif data_points is not None: # Hopefully it's a string context = data_points + else: + raise ValueError("Context is missing") except Exception: raise ValueError( "Response does not adhere to the expected schema. "