Skip to content

Commit

Permalink
Merge pull request #1 from guardrails-ai/fix-api-ref
Browse files Browse the repository at this point in the history
Fix API Reference
  • Loading branch information
CalebCourier authored Apr 4, 2024
2 parents 7ad69a9 + e619e05 commit 16e7b30
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.python-version
__pycache__/
build
*.egg-info
*.egg-info
.venv
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Initializes a new instance of the Validator class.

<br>

**`__call__(self, value, metadata={}) ValidationResult`**
**`validate(self, value, metadata={}) -> ValidationResult`**

<ul>

Expand Down
2 changes: 1 addition & 1 deletion validator/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __init__(
):
super().__init__(on_fail=on_fail, llm_callable=llm_callable)

def validate(self, value: Any, metadata: Dict) -> ValidationResult:
def validate(self, value: Any, metadata: Dict = {}) -> ValidationResult:
"""Validates that the LLM response is relevant to the given prompt."""

original_prompt = metadata.get("original_prompt", None)
Expand Down

0 comments on commit 16e7b30

Please sign in to comment.