Skip to content

Commit

Permalink
fix bug that tests caught
Browse files Browse the repository at this point in the history
  • Loading branch information
nichwch committed Jul 1, 2024
1 parent f34345c commit 51c1e31
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions guardrails_api/blueprints/guards.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ def validate(guard_name: str):
)
decoded_guard_name = unquote_plus(guard_name)
guard_struct = guard_client.get_guard(decoded_guard_name)

llm_output = payload.pop("llmOutput", None)
num_reasks = payload.pop("numReasks", None)
prompt_params = payload.pop("promptParams", {})
Expand Down Expand Up @@ -215,7 +214,7 @@ def validate(guard_name: str):
elif is_async:
guard:Guard = AsyncGuard.from_dict(guard_struct.to_dict())

elif num_reasks and num_reasks > 1:
if llm_api is None and num_reasks and num_reasks > 1:
raise HttpError(
status=400,
message="BadRequest",
Expand Down

0 comments on commit 51c1e31

Please sign in to comment.