|
16 | 16 | "\n", |
17 | 17 | "We want to extract structured information about all fees and interest rates associated with the Chase credit card.\n", |
18 | 18 | "\n", |
19 | | - "## Step 0: Download PDF and load it as string\n", |
| 19 | + "## Step 0: Download PDF and load it as string and Install Validators from Guardrails Hub \n", |
20 | 20 | "\n", |
21 | 21 | "To get started, download the document from [here](https://github.com/ShreyaR/guardrails/blob/main/docs/examples/data/chase_card_agreement.pdf) and save it in `data/chase_card_agreement.pdf`.\n", |
22 | 22 | "\n", |
23 | | - "Guardrails has some built-in functions to help with common tasks. Here, we will use the `read_pdf` function to load the PDF as a string." |
| 23 | + "Guardrails has some built-in functions to help with common tasks. Here, we will use the `read_pdf` function to load the PDF as a string.\n", |
| 24 | + "\n", |
| 25 | + "We also need to install the necessary validators from Guardrails Hub: \n", |
| 26 | + "\n", |
| 27 | + "1. LowerCase: ```guardrails hub install hub://guardrails/lowercase```\n", |
| 28 | + "\n", |
| 29 | + "2. TwoWords: ```guardrails hub install hub://guardrails/two_words```\n", |
| 30 | + "\n", |
| 31 | + "3. OneLine: ```guardrails hub install hub://guardrails/one_line```" |
24 | 32 | ] |
25 | 33 | }, |
26 | 34 | { |
27 | 35 | "cell_type": "code", |
28 | | - "execution_count": 22, |
| 36 | + "execution_count": null, |
29 | 37 | "metadata": {}, |
30 | 38 | "outputs": [ |
31 | 39 | { |
|
143 | 151 | "metadata": {}, |
144 | 152 | "outputs": [], |
145 | 153 | "source": [ |
146 | | - "from guardrails.validators import LowerCase, TwoWords, OneLine\n", |
| 154 | + "from guardrails.hub import LowerCase, TwoWords, OneLine\n", |
147 | 155 | "from pydantic import BaseModel, Field\n", |
148 | 156 | "from typing import List\n", |
149 | 157 | "\n", |
|
0 commit comments