Skip to content

Commit 0f8f889

Browse files
Merge pull request #2 from guardrails-ai/main
README formatting and CI fixes
2 parents fca07c1 + e455f28 commit 0f8f889

File tree

5 files changed

+17
-12
lines changed

5 files changed

+17
-12
lines changed

.github/workflows/pr_qc.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,16 @@ jobs:
99
steps:
1010
- name: Check out repository code
1111
uses: actions/checkout@v4
12-
- name: Set up Python
13-
uses: actions/setup-python@v5
12+
- name: Install the latest version of uv
13+
uses: astral-sh/setup-uv@v7
1414
with:
15+
enable-cache: false
1516
python-version: 3.11
1617
- name: Run qa
18+
env:
19+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
1720
run: |
18-
pip install ".[dev]"
21+
python -m venv ./.venv
22+
source ./.venv/bin/activate
23+
make dev
1924
make qa

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,16 +153,18 @@ Note:
153153

154154
**Parameters**
155155

156-
- **`value`** _(Any)_: The input value to validate.
157-
- **`metadata`** _(dict)_: A dictionary containing metadata required for validation. Keys and values must match the expectations of this validator.
156+
- **`value`** *(Any)*: The input value to validate.
157+
- **`metadata`** *(dict)*: A dictionary containing metadata required for validation. Keys and values must match the expectations of this validator.
158+
159+
158160
| Key | Type | Description | Default |
159161
| --- | --- | --- | --- |
160162
| `user_input` | String | The original user query passed into the RAG system. | N/A (Required) |
161163
| `retrieved_context` | String | The context retrieved and used by the RAG system. | N/A (Required) |
162164
| `min_range_value` | String | The minimum value for the rating range used by the LLM judge. | 0 (the default of the validator class) |
163165
| `max_range_value` | String | The maximum value for the rating range used by the LLM judge. | 1 (the default of the validator class) |
164-
</ul>
166+
</ul>
165167

166168
**Returns**
167169

168-
**`ValidationResult`**: Returns a `PassResult` if the LLM judge's rating meets or exceeds the pass threshold, or a `FailResult` with detailed explanation if the rating is below the threshold.
170+
**`ValidationResult`**: Returns a `PassResult` if the LLM judge's rating meets or exceeds the pass threshold, or a `FailResult` with detailed explanation if the rating is below the threshold.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "rag-context-evaluator"
3-
version = "0.0.1"
3+
version = "0.0.2"
44
description = "ML3 RAG Context Evaluator"
55
authors = [
66
{name = "MLcube", email = "[email protected]"}

uv.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

validator/main.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
from typing import Any, Callable, Dict, Optional
2-
from guardrails import Guard
3-
import openai
42
import logging
53
from guardrails.validator_base import (
64
FailResult,

0 commit comments

Comments
 (0)