Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pamelafox committed Oct 3, 2024
1 parent 720f625 commit c3bcb54
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 1 addition & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"python.testing.pytestArgs": [
"scripts"
],
"python.testing.pytestArgs": ["tests"],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"files.exclude": {
Expand Down
4 changes: 3 additions & 1 deletion src/evaltools/eval/evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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. "
Expand Down

0 comments on commit c3bcb54

Please sign in to comment.