Skip to content

Commit

Permalink
Merge pull request #1011 from guardrails-ai/0.5.4-release
Browse files Browse the repository at this point in the history
bump version, log on to hub
  • Loading branch information
dtam authored Aug 14, 2024
2 parents a5f7ae0 + e621c4b commit 9e01819
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
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 <[email protected]>"]
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

0 comments on commit 9e01819

Please sign in to comment.