Skip to content

bump version, log on to hub #1011

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/examples_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
HUGGINGFACE_API_KEY: ${{ secrets.HUGGINGFACE_API_KEY }}
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
GUARDRAILS_API_KEY: ${{ secrets.GUARDRAILS_API_KEY }}
NLTK_DATA: /tmp/nltk_data
steps:
- name: Checkout repository
Expand Down Expand Up @@ -58,6 +59,10 @@ jobs:
source .venv/bin/activate
mkdir /tmp/nltk_data;
python -m nltk.downloader -d /tmp/nltk_data punkt;
- name: Login to Guardrails
run: |
source .venv/bin/activate
guardrails configure --token $GUARDRAILS_API_KEY --disable-metrics --enable-remote-inferencing
- name: Execute notebooks and check for errors
run: |
source .venv/bin/activate
Expand Down
10 changes: 4 additions & 6 deletions docs/examples/toxic_language.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,8 @@
"# Here, we'll use the default validation method of \"sentence\"\n",
"# and the default threshold of 0.25\n",
"\n",
"guard = gd.Guard.from_string(\n",
" validators=[ToxicLanguage(on_fail=\"fix\")],\n",
" description=\"testmeout\",\n",
"guard = gd.Guard().use(\n",
" ToxicLanguage(on_fail=\"fix\")\n",
")"
]
},
Expand Down Expand Up @@ -170,9 +169,8 @@
"outputs": [],
"source": [
"# Test with validation method 'full'\n",
"full_guard = gd.Guard.from_string(\n",
" validators=[ToxicLanguage(validation_method=\"full\", on_fail=\"fix\")],\n",
" description=\"testmeout\",\n",
"full_guard = gd.Guard().use(\n",
" ToxicLanguage(validation_method=\"full\", on_fail=\"fix\")\n",
")"
]
},
Expand Down
3 changes: 1 addition & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "guardrails-ai"
version = "0.5.3"
version = "0.5.4"
description = "Adding guardrails to large language models."
authors = ["Guardrails AI <contact@guardrailsai.com>"]
license = "Apache License 2.0"
Expand Down Expand Up @@ -28,7 +28,7 @@ rstr = "^3.2.2"
typing-extensions = "^4.8.0"
python-dateutil = "^2.8.2"
tiktoken = ">=0.5.1"
nltk = "^3.8.1"
nltk = ">3.0, <=3.8.1"
litellm = "^1.37.14"
sqlvalidator = {version = "^0.0.20", optional = true}
sqlalchemy = {version = ">=2.0.9", optional = true}
Expand Down
Loading