diff --git a/.github/workflows/scripts/run_notebooks.sh b/.github/workflows/scripts/run_notebooks.sh index 51ff78a52..12549dea2 100755 --- a/.github/workflows/scripts/run_notebooks.sh +++ b/.github/workflows/scripts/run_notebooks.sh @@ -5,7 +5,7 @@ export NLTK_DATA=/tmp/nltk_data; rm -rf ./guardrails # Navigate to notebooks -cd docs/examples +cd docs/src/examples # Get the notebook name from the matrix variable notebook="$1" diff --git a/.github/workflows/scripts/update_notebook_matrix.sh b/.github/workflows/scripts/update_notebook_matrix.sh index f35f2c773..9879d4e47 100755 --- a/.github/workflows/scripts/update_notebook_matrix.sh +++ b/.github/workflows/scripts/update_notebook_matrix.sh @@ -3,7 +3,7 @@ notebook_names="[" # Compile list of file names -for file in $(ls docs/examples/*.ipynb); do +for file in $(ls docs/src/examples/*.ipynb); do # Add the full filename with extension filename=$(basename "$file") diff --git a/docs/dist/examples/bug_free_python_code.ipynb b/docs/dist/examples/bug_free_python_code.ipynb index ad5b8117b..ec34e11c7 100644 --- a/docs/dist/examples/bug_free_python_code.ipynb +++ b/docs/dist/examples/bug_free_python_code.ipynb @@ -8,7 +8,7 @@ "# Generating Bug Free Leetcode Solutions\n", "\n", ":::note\n", - "To download this tutorial as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/bug_free_python_code.ipynb).\n", + "To download this tutorial as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/bug_free_python_code.ipynb).\n", ":::\n", "\n", "In this example, we want to solve String Manipulation leetcode problems such that the code is bug free.\n", diff --git a/docs/dist/examples/bug_free_python_code.md b/docs/dist/examples/bug_free_python_code.md index 045e44acc..8517e2a88 100644 --- a/docs/dist/examples/bug_free_python_code.md +++ b/docs/dist/examples/bug_free_python_code.md @@ -3,7 +3,7 @@ import CodeOutputBlock from '../../code-output-block.jsx'; # Generating Bug Free Leetcode Solutions :::note -To download this tutorial as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/bug_free_python_code.ipynb). +To download this tutorial as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/bug_free_python_code.ipynb). ::: In this example, we want to solve String Manipulation leetcode problems such that the code is bug free. diff --git a/docs/dist/examples/chatbot.ipynb b/docs/dist/examples/chatbot.ipynb index a6afbb91c..dfdc16ea7 100644 --- a/docs/dist/examples/chatbot.ipynb +++ b/docs/dist/examples/chatbot.ipynb @@ -44,7 +44,7 @@ "source": [ "### Step 0 Download PDF and load it as string\n", ":::note\n", - " To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/chatbots.ipynb).\n", + " To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/chatbots.ipynb).\n", ":::\n", "\n", "In this example, we will set up Guardrails with a chat model that can answer questions about the card agreement." diff --git a/docs/dist/examples/chatbot.md b/docs/dist/examples/chatbot.md index db16cc357..911246a85 100644 --- a/docs/dist/examples/chatbot.md +++ b/docs/dist/examples/chatbot.md @@ -33,7 +33,7 @@ guardrails hub install hub://guardrails/profanity_free --quiet ### Step 0 Download PDF and load it as string :::note - To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/chatbots.ipynb). + To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/chatbots.ipynb). ::: In this example, we will set up Guardrails with a chat model that can answer questions about the card agreement. diff --git a/docs/dist/examples/competitors_check.ipynb b/docs/dist/examples/competitors_check.ipynb index 8729364ad..7d23837e6 100644 --- a/docs/dist/examples/competitors_check.ipynb +++ b/docs/dist/examples/competitors_check.ipynb @@ -7,7 +7,7 @@ "# Check if a competitor is named\n", "\n", "!!! note\n", - "To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/competitors_check.ipynb).\n" + "To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/competitors_check.ipynb).\n" ] }, { diff --git a/docs/dist/examples/competitors_check.md b/docs/dist/examples/competitors_check.md index 4964c0dde..c2126f4e0 100644 --- a/docs/dist/examples/competitors_check.md +++ b/docs/dist/examples/competitors_check.md @@ -3,7 +3,7 @@ import CodeOutputBlock from '../../code-output-block.jsx'; # Check if a competitor is named !!! note -To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/competitors_check.ipynb). +To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/competitors_check.ipynb). diff --git a/docs/dist/examples/extracting_entities.ipynb b/docs/dist/examples/extracting_entities.ipynb index 80330bc6e..964cd8618 100644 --- a/docs/dist/examples/extracting_entities.ipynb +++ b/docs/dist/examples/extracting_entities.ipynb @@ -52,7 +52,7 @@ "# Extracting entities from a Terms of Service document\n", "\n", "!!! note\n", - " To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/examples/extracting_entities.ipynb).\n", + " To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/src/examples/extracting_entities.ipynb).\n", "\n", "In this example, we will use Guardrails to extract key information from a Terms-of-Service document.\n", "\n", @@ -62,7 +62,7 @@ "\n", "## Step 0: Download PDF and load it as string\n", "\n", - "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", + "To get started, download the document from [here](https://github.com/ShreyaR/guardrails/blob/main/docs/src/examples/data/chase_card_agreement.pdf) and save it in `data/chase_card_agreement.pdf`.\n", "\n", "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." ] diff --git a/docs/dist/examples/extracting_entities.md b/docs/dist/examples/extracting_entities.md index 559167919..140f2afb6 100644 --- a/docs/dist/examples/extracting_entities.md +++ b/docs/dist/examples/extracting_entities.md @@ -44,7 +44,7 @@ guardrails hub install hub://guardrails/one_line --quiet # Extracting entities from a Terms of Service document !!! note - To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/examples/extracting_entities.ipynb). + To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/src/examples/extracting_entities.ipynb). In this example, we will use Guardrails to extract key information from a Terms-of-Service document. @@ -54,7 +54,7 @@ We want to extract structured information about all fees and interest rates asso ## Step 0: Download PDF and load it as string -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`. +To get started, download the document from [here](https://github.com/ShreyaR/guardrails/blob/main/docs/src/examples/data/chase_card_agreement.pdf) and save it in `data/chase_card_agreement.pdf`. 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. diff --git a/docs/dist/examples/guardrails_with_chat_models.ipynb b/docs/dist/examples/guardrails_with_chat_models.ipynb index f6a81906b..80263f12f 100644 --- a/docs/dist/examples/guardrails_with_chat_models.ipynb +++ b/docs/dist/examples/guardrails_with_chat_models.ipynb @@ -42,7 +42,7 @@ "# Using Guardrails with Chat Models\n", "\n", "!!! note\n", - " To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/extracting_entities.ipynb).\n", + " To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/extracting_entities.ipynb).\n", "\n", "In this example, we will set up Guardrails with a chat model.\n", "\n", @@ -52,7 +52,7 @@ "\n", "## Step 0: Download PDF and load it as string\n", "\n", - "To get started, download the document from [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/data/chase_card_agreement.pdf) and save it in `data/chase_card_agreement.pdf`.\n", + "To get started, download the document from [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/data/chase_card_agreement.pdf) and save it in `data/chase_card_agreement.pdf`.\n", "\n", "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." ] diff --git a/docs/dist/examples/guardrails_with_chat_models.md b/docs/dist/examples/guardrails_with_chat_models.md index f37f3f9f9..386fb1db5 100644 --- a/docs/dist/examples/guardrails_with_chat_models.md +++ b/docs/dist/examples/guardrails_with_chat_models.md @@ -36,7 +36,7 @@ guardrails hub install hub://guardrails/one_line --quiet # Using Guardrails with Chat Models !!! note - To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/extracting_entities.ipynb). + To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/extracting_entities.ipynb). In this example, we will set up Guardrails with a chat model. @@ -46,7 +46,7 @@ We retry the [entity extraction example](./extracting_entities.ipynb) using a ch ## Step 0: Download PDF and load it as string -To get started, download the document from [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/data/chase_card_agreement.pdf) and save it in `data/chase_card_agreement.pdf`. +To get started, download the document from [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/data/chase_card_agreement.pdf) and save it in `data/chase_card_agreement.pdf`. 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. diff --git a/docs/dist/examples/no_secrets_in_generated_text.ipynb b/docs/dist/examples/no_secrets_in_generated_text.ipynb index d002d130c..1abf24273 100644 --- a/docs/dist/examples/no_secrets_in_generated_text.ipynb +++ b/docs/dist/examples/no_secrets_in_generated_text.ipynb @@ -8,7 +8,7 @@ "# Generating strings that don't have any secrets\n", "\n", "!!! note\n", - " To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/no_secrets_in_generated_text.ipynb).\n", + " To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/no_secrets_in_generated_text.ipynb).\n", "\n", "In this example, we will use Guardrails to generate strings that don't have any secrets.\n", "\n", diff --git a/docs/dist/examples/no_secrets_in_generated_text.md b/docs/dist/examples/no_secrets_in_generated_text.md index 199f0cd88..bce7649a9 100644 --- a/docs/dist/examples/no_secrets_in_generated_text.md +++ b/docs/dist/examples/no_secrets_in_generated_text.md @@ -3,7 +3,7 @@ import CodeOutputBlock from '../../code-output-block.jsx'; # Generating strings that don't have any secrets !!! note - To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/no_secrets_in_generated_text.ipynb). + To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/no_secrets_in_generated_text.ipynb). In this example, we will use Guardrails to generate strings that don't have any secrets. diff --git a/docs/dist/examples/recipe_generation.ipynb b/docs/dist/examples/recipe_generation.ipynb index 14181dfb6..94939a22c 100644 --- a/docs/dist/examples/recipe_generation.ipynb +++ b/docs/dist/examples/recipe_generation.ipynb @@ -8,7 +8,7 @@ "# Generating Vegan Recipes\n", "\n", "!!! note\n", - " To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/examples/recipe_generation.ipynb).\n", + " To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/src/examples/recipe_generation.ipynb).\n", "\n", "In this example, we will use Guardrails to generate vegan mac and cheese recipe.\n", "\n", diff --git a/docs/dist/examples/recipe_generation.md b/docs/dist/examples/recipe_generation.md index 41038350a..89e288d46 100644 --- a/docs/dist/examples/recipe_generation.md +++ b/docs/dist/examples/recipe_generation.md @@ -3,7 +3,7 @@ import CodeOutputBlock from '../../code-output-block.jsx'; # Generating Vegan Recipes !!! note - To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/examples/recipe_generation.ipynb). + To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/src/examples/recipe_generation.ipynb). In this example, we will use Guardrails to generate vegan mac and cheese recipe. diff --git a/docs/dist/examples/select_choice_based_on_action.ipynb b/docs/dist/examples/select_choice_based_on_action.ipynb index 2922dd7ca..629220198 100644 --- a/docs/dist/examples/select_choice_based_on_action.ipynb +++ b/docs/dist/examples/select_choice_based_on_action.ipynb @@ -27,7 +27,7 @@ "# Enforcing Guardrails on Choice Selection\n", "\n", "!!! note\n", - " To download this tutorial as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/select_choice_based_on_action.ipynb).\n", + " To download this tutorial as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/select_choice_based_on_action.ipynb).\n", "\n", "In this example, we want the LLM to pick an action (e.g. `fight` or `flight`), and based on that action we want to return different JSON objects. For example, if the action is `fight`, we want to return a JSON object that contains the `weapon` field. If the action is `flight`, we want to return a JSON object that contains the `direction` and `distance` fields.\n", "\n", diff --git a/docs/dist/examples/select_choice_based_on_action.md b/docs/dist/examples/select_choice_based_on_action.md index 4e099f99d..398854a0a 100644 --- a/docs/dist/examples/select_choice_based_on_action.md +++ b/docs/dist/examples/select_choice_based_on_action.md @@ -20,7 +20,7 @@ guardrails hub install hub://guardrails/valid_choices --quiet # Enforcing Guardrails on Choice Selection !!! note - To download this tutorial as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/select_choice_based_on_action.ipynb). + To download this tutorial as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/select_choice_based_on_action.ipynb). In this example, we want the LLM to pick an action (e.g. `fight` or `flight`), and based on that action we want to return different JSON objects. For example, if the action is `fight`, we want to return a JSON object that contains the `weapon` field. If the action is `flight`, we want to return a JSON object that contains the `direction` and `distance` fields. diff --git a/docs/dist/examples/summarizer.ipynb b/docs/dist/examples/summarizer.ipynb index cafab3a5e..29e5033ba 100644 --- a/docs/dist/examples/summarizer.ipynb +++ b/docs/dist/examples/summarizer.ipynb @@ -9,7 +9,7 @@ "In this example we will use Guardrails to summarize text in terms of length, quality and output read time.\n", "\n", "!!! note\n", - " To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/examples/summarization.ipynb).\n", + " To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/src/examples/summarization.ipynb).\n", "\n", "In this example, we will use Guardrails in the summarization of a text document. We will check whether the summarized document has a high semantic similarity with the original document. We will ensure the ouptput meets a certain range of length and read time.\n", "\n", diff --git a/docs/dist/examples/summarizer.md b/docs/dist/examples/summarizer.md index e41d5ec20..f0fce2b65 100644 --- a/docs/dist/examples/summarizer.md +++ b/docs/dist/examples/summarizer.md @@ -5,7 +5,7 @@ import CodeOutputBlock from '../../code-output-block.jsx'; In this example we will use Guardrails to summarize text in terms of length, quality and output read time. !!! note - To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/examples/summarization.ipynb). + To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/src/examples/summarization.ipynb). In this example, we will use Guardrails in the summarization of a text document. We will check whether the summarized document has a high semantic similarity with the original document. We will ensure the ouptput meets a certain range of length and read time. diff --git a/docs/dist/examples/syntax_error_free_sql.ipynb b/docs/dist/examples/syntax_error_free_sql.ipynb index ade11df8e..2188e1921 100644 --- a/docs/dist/examples/syntax_error_free_sql.ipynb +++ b/docs/dist/examples/syntax_error_free_sql.ipynb @@ -28,7 +28,7 @@ "# Natural Language to Bug Free SQL\n", "\n", "!!! note\n", - " To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/syntax_error_free_sql.ipynb).\n", + " To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/syntax_error_free_sql.ipynb).\n", "\n", "In this example, we will use Guardrails to generate SQL queries from natural language. We will check that the SQL is free of any syntax errors.\n", "\n", diff --git a/docs/dist/examples/syntax_error_free_sql.md b/docs/dist/examples/syntax_error_free_sql.md index 30299b099..003a0d312 100644 --- a/docs/dist/examples/syntax_error_free_sql.md +++ b/docs/dist/examples/syntax_error_free_sql.md @@ -20,7 +20,7 @@ guardrails hub install hub://guardrails/valid_sql --quiet # Natural Language to Bug Free SQL !!! note - To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/syntax_error_free_sql.ipynb). + To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/syntax_error_free_sql.ipynb). In this example, we will use Guardrails to generate SQL queries from natural language. We will check that the SQL is free of any syntax errors. diff --git a/docs/dist/examples/text_summarization_quality.ipynb b/docs/dist/examples/text_summarization_quality.ipynb index 42032d7d4..f3d320ada 100644 --- a/docs/dist/examples/text_summarization_quality.ipynb +++ b/docs/dist/examples/text_summarization_quality.ipynb @@ -28,7 +28,7 @@ "# Summarize text accurately\n", "\n", ":::note\n", - " To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/examples/text_summarization_quality.ipynb).\n", + " To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/src/examples/text_summarization_quality.ipynb).\n", ":::\n", "\n", "In this example, we will use Guardrails in the summarization of a text document. We will check whether the summarized document has a high semantic similarity with the original document.\n", diff --git a/docs/dist/examples/text_summarization_quality.md b/docs/dist/examples/text_summarization_quality.md index 1a502027b..ac4ab9efb 100644 --- a/docs/dist/examples/text_summarization_quality.md +++ b/docs/dist/examples/text_summarization_quality.md @@ -20,7 +20,7 @@ guardrails hub install hub://guardrails/similar_to_document --quiet # Summarize text accurately :::note - To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/examples/text_summarization_quality.ipynb). + To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/src/examples/text_summarization_quality.ipynb). ::: In this example, we will use Guardrails in the summarization of a text document. We will check whether the summarized document has a high semantic similarity with the original document. diff --git a/docs/dist/examples/translation_to_specific_language.ipynb b/docs/dist/examples/translation_to_specific_language.ipynb index 0bb7033e4..572e53365 100644 --- a/docs/dist/examples/translation_to_specific_language.ipynb +++ b/docs/dist/examples/translation_to_specific_language.ipynb @@ -8,7 +8,7 @@ "# Translate text without profanities\n", "\n", "!!! note\n", - " To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/examples/translation_to_specific_language.ipynb).\n", + " To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/src/examples/translation_to_specific_language.ipynb).\n", "\n", "In this example, we will use Guardrails during the translation of a statement from another language to english. We will check whether the translated statement passes the profanity check or not.\n", "\n", diff --git a/docs/dist/examples/translation_to_specific_language.md b/docs/dist/examples/translation_to_specific_language.md index 0eea1cec5..0c6443e65 100644 --- a/docs/dist/examples/translation_to_specific_language.md +++ b/docs/dist/examples/translation_to_specific_language.md @@ -3,7 +3,7 @@ import CodeOutputBlock from '../../code-output-block.jsx'; # Translate text without profanities !!! note - To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/examples/translation_to_specific_language.ipynb). + To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/src/examples/translation_to_specific_language.ipynb). In this example, we will use Guardrails during the translation of a statement from another language to english. We will check whether the translated statement passes the profanity check or not. diff --git a/docs/dist/examples/translation_with_quality_check.ipynb b/docs/dist/examples/translation_with_quality_check.ipynb index 9d386ed72..45acb75f3 100644 --- a/docs/dist/examples/translation_with_quality_check.ipynb +++ b/docs/dist/examples/translation_with_quality_check.ipynb @@ -43,7 +43,7 @@ "# Translate text with quality checks\n", "\n", "**Note:**\n", - "To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/translation_with_quality_check.ipynb).\n", + "To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/translation_with_quality_check.ipynb).\n", "\n", "In this example, we will use Guardrails during the translation of a statement from another language to English. We will check whether the translated statement is likely of high quality.\n", "\n", diff --git a/docs/dist/examples/translation_with_quality_check.md b/docs/dist/examples/translation_with_quality_check.md index 396fb1502..cb1c06d87 100644 --- a/docs/dist/examples/translation_with_quality_check.md +++ b/docs/dist/examples/translation_with_quality_check.md @@ -35,7 +35,7 @@ guardrails hub install hub://brainlogic/high_quality_translation -q # Translate text with quality checks **Note:** -To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/translation_with_quality_check.ipynb). +To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/translation_with_quality_check.ipynb). In this example, we will use Guardrails during the translation of a statement from another language to English. We will check whether the translated statement is likely of high quality. diff --git a/docs/dist/examples/valid_chess_moves.ipynb b/docs/dist/examples/valid_chess_moves.ipynb index b8fad6b89..11f758bb1 100644 --- a/docs/dist/examples/valid_chess_moves.ipynb +++ b/docs/dist/examples/valid_chess_moves.ipynb @@ -8,7 +8,7 @@ "# Playing Valid Chess Moves\n", "\n", "!!! note\n", - " To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/valid_chess_moves.ipynb).\n", + " To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/valid_chess_moves.ipynb).\n", "\n", "!!! warning\n", " This example is currently under development (it cannot be used to play a full chess game yet).\n", diff --git a/docs/dist/examples/valid_chess_moves.md b/docs/dist/examples/valid_chess_moves.md index 1d2e17ac2..4e91baa6f 100644 --- a/docs/dist/examples/valid_chess_moves.md +++ b/docs/dist/examples/valid_chess_moves.md @@ -3,7 +3,7 @@ import CodeOutputBlock from '../../code-output-block.jsx'; # Playing Valid Chess Moves !!! note - To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/valid_chess_moves.ipynb). + To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/valid_chess_moves.ipynb). !!! warning This example is currently under development (it cannot be used to play a full chess game yet). diff --git a/docs/sidebars.js b/docs/sidebars.js index 7dccb42bf..e25b85e71 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -99,7 +99,7 @@ const sidebars = { { type: "link", label: "More Examples", - href: "https://github.com/guardrails-ai/guardrails/tree/main/docs/examples", + href: "https://github.com/guardrails-ai/guardrails/tree/main/docs/src/examples", }, ], integrations: [ diff --git a/docs/src/examples/bug_free_python_code.ipynb b/docs/src/examples/bug_free_python_code.ipynb index ad5b8117b..ec34e11c7 100644 --- a/docs/src/examples/bug_free_python_code.ipynb +++ b/docs/src/examples/bug_free_python_code.ipynb @@ -8,7 +8,7 @@ "# Generating Bug Free Leetcode Solutions\n", "\n", ":::note\n", - "To download this tutorial as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/bug_free_python_code.ipynb).\n", + "To download this tutorial as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/bug_free_python_code.ipynb).\n", ":::\n", "\n", "In this example, we want to solve String Manipulation leetcode problems such that the code is bug free.\n", diff --git a/docs/src/examples/chatbot.ipynb b/docs/src/examples/chatbot.ipynb index a6afbb91c..dfdc16ea7 100644 --- a/docs/src/examples/chatbot.ipynb +++ b/docs/src/examples/chatbot.ipynb @@ -44,7 +44,7 @@ "source": [ "### Step 0 Download PDF and load it as string\n", ":::note\n", - " To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/chatbots.ipynb).\n", + " To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/chatbots.ipynb).\n", ":::\n", "\n", "In this example, we will set up Guardrails with a chat model that can answer questions about the card agreement." diff --git a/docs/src/examples/competitors_check.ipynb b/docs/src/examples/competitors_check.ipynb index 8729364ad..7d23837e6 100644 --- a/docs/src/examples/competitors_check.ipynb +++ b/docs/src/examples/competitors_check.ipynb @@ -7,7 +7,7 @@ "# Check if a competitor is named\n", "\n", "!!! note\n", - "To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/competitors_check.ipynb).\n" + "To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/competitors_check.ipynb).\n" ] }, { diff --git a/docs/src/examples/extracting_entities.ipynb b/docs/src/examples/extracting_entities.ipynb index 80330bc6e..964cd8618 100644 --- a/docs/src/examples/extracting_entities.ipynb +++ b/docs/src/examples/extracting_entities.ipynb @@ -52,7 +52,7 @@ "# Extracting entities from a Terms of Service document\n", "\n", "!!! note\n", - " To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/examples/extracting_entities.ipynb).\n", + " To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/src/examples/extracting_entities.ipynb).\n", "\n", "In this example, we will use Guardrails to extract key information from a Terms-of-Service document.\n", "\n", @@ -62,7 +62,7 @@ "\n", "## Step 0: Download PDF and load it as string\n", "\n", - "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", + "To get started, download the document from [here](https://github.com/ShreyaR/guardrails/blob/main/docs/src/examples/data/chase_card_agreement.pdf) and save it in `data/chase_card_agreement.pdf`.\n", "\n", "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." ] diff --git a/docs/src/examples/guardrails_with_chat_models.ipynb b/docs/src/examples/guardrails_with_chat_models.ipynb index f6a81906b..80263f12f 100644 --- a/docs/src/examples/guardrails_with_chat_models.ipynb +++ b/docs/src/examples/guardrails_with_chat_models.ipynb @@ -42,7 +42,7 @@ "# Using Guardrails with Chat Models\n", "\n", "!!! note\n", - " To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/extracting_entities.ipynb).\n", + " To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/extracting_entities.ipynb).\n", "\n", "In this example, we will set up Guardrails with a chat model.\n", "\n", @@ -52,7 +52,7 @@ "\n", "## Step 0: Download PDF and load it as string\n", "\n", - "To get started, download the document from [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/data/chase_card_agreement.pdf) and save it in `data/chase_card_agreement.pdf`.\n", + "To get started, download the document from [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/data/chase_card_agreement.pdf) and save it in `data/chase_card_agreement.pdf`.\n", "\n", "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." ] diff --git a/docs/src/examples/no_secrets_in_generated_text.ipynb b/docs/src/examples/no_secrets_in_generated_text.ipynb index d002d130c..1abf24273 100644 --- a/docs/src/examples/no_secrets_in_generated_text.ipynb +++ b/docs/src/examples/no_secrets_in_generated_text.ipynb @@ -8,7 +8,7 @@ "# Generating strings that don't have any secrets\n", "\n", "!!! note\n", - " To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/no_secrets_in_generated_text.ipynb).\n", + " To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/no_secrets_in_generated_text.ipynb).\n", "\n", "In this example, we will use Guardrails to generate strings that don't have any secrets.\n", "\n", diff --git a/docs/src/examples/recipe_generation.ipynb b/docs/src/examples/recipe_generation.ipynb index 14181dfb6..94939a22c 100644 --- a/docs/src/examples/recipe_generation.ipynb +++ b/docs/src/examples/recipe_generation.ipynb @@ -8,7 +8,7 @@ "# Generating Vegan Recipes\n", "\n", "!!! note\n", - " To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/examples/recipe_generation.ipynb).\n", + " To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/src/examples/recipe_generation.ipynb).\n", "\n", "In this example, we will use Guardrails to generate vegan mac and cheese recipe.\n", "\n", diff --git a/docs/src/examples/select_choice_based_on_action.ipynb b/docs/src/examples/select_choice_based_on_action.ipynb index 2922dd7ca..629220198 100644 --- a/docs/src/examples/select_choice_based_on_action.ipynb +++ b/docs/src/examples/select_choice_based_on_action.ipynb @@ -27,7 +27,7 @@ "# Enforcing Guardrails on Choice Selection\n", "\n", "!!! note\n", - " To download this tutorial as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/select_choice_based_on_action.ipynb).\n", + " To download this tutorial as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/select_choice_based_on_action.ipynb).\n", "\n", "In this example, we want the LLM to pick an action (e.g. `fight` or `flight`), and based on that action we want to return different JSON objects. For example, if the action is `fight`, we want to return a JSON object that contains the `weapon` field. If the action is `flight`, we want to return a JSON object that contains the `direction` and `distance` fields.\n", "\n", diff --git a/docs/src/examples/summarizer.ipynb b/docs/src/examples/summarizer.ipynb index cafab3a5e..29e5033ba 100644 --- a/docs/src/examples/summarizer.ipynb +++ b/docs/src/examples/summarizer.ipynb @@ -9,7 +9,7 @@ "In this example we will use Guardrails to summarize text in terms of length, quality and output read time.\n", "\n", "!!! note\n", - " To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/examples/summarization.ipynb).\n", + " To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/src/examples/summarization.ipynb).\n", "\n", "In this example, we will use Guardrails in the summarization of a text document. We will check whether the summarized document has a high semantic similarity with the original document. We will ensure the ouptput meets a certain range of length and read time.\n", "\n", diff --git a/docs/src/examples/syntax_error_free_sql.ipynb b/docs/src/examples/syntax_error_free_sql.ipynb index ade11df8e..2188e1921 100644 --- a/docs/src/examples/syntax_error_free_sql.ipynb +++ b/docs/src/examples/syntax_error_free_sql.ipynb @@ -28,7 +28,7 @@ "# Natural Language to Bug Free SQL\n", "\n", "!!! note\n", - " To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/syntax_error_free_sql.ipynb).\n", + " To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/syntax_error_free_sql.ipynb).\n", "\n", "In this example, we will use Guardrails to generate SQL queries from natural language. We will check that the SQL is free of any syntax errors.\n", "\n", diff --git a/docs/src/examples/text_summarization_quality.ipynb b/docs/src/examples/text_summarization_quality.ipynb index 42032d7d4..f3d320ada 100644 --- a/docs/src/examples/text_summarization_quality.ipynb +++ b/docs/src/examples/text_summarization_quality.ipynb @@ -28,7 +28,7 @@ "# Summarize text accurately\n", "\n", ":::note\n", - " To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/examples/text_summarization_quality.ipynb).\n", + " To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/src/examples/text_summarization_quality.ipynb).\n", ":::\n", "\n", "In this example, we will use Guardrails in the summarization of a text document. We will check whether the summarized document has a high semantic similarity with the original document.\n", diff --git a/docs/src/examples/translation_to_specific_language.ipynb b/docs/src/examples/translation_to_specific_language.ipynb index 0bb7033e4..572e53365 100644 --- a/docs/src/examples/translation_to_specific_language.ipynb +++ b/docs/src/examples/translation_to_specific_language.ipynb @@ -8,7 +8,7 @@ "# Translate text without profanities\n", "\n", "!!! note\n", - " To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/examples/translation_to_specific_language.ipynb).\n", + " To download this example as a Jupyter notebook, click [here](https://github.com/ShreyaR/guardrails/blob/main/docs/src/examples/translation_to_specific_language.ipynb).\n", "\n", "In this example, we will use Guardrails during the translation of a statement from another language to english. We will check whether the translated statement passes the profanity check or not.\n", "\n", diff --git a/docs/src/examples/translation_with_quality_check.ipynb b/docs/src/examples/translation_with_quality_check.ipynb index 9d386ed72..45acb75f3 100644 --- a/docs/src/examples/translation_with_quality_check.ipynb +++ b/docs/src/examples/translation_with_quality_check.ipynb @@ -43,7 +43,7 @@ "# Translate text with quality checks\n", "\n", "**Note:**\n", - "To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/translation_with_quality_check.ipynb).\n", + "To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/translation_with_quality_check.ipynb).\n", "\n", "In this example, we will use Guardrails during the translation of a statement from another language to English. We will check whether the translated statement is likely of high quality.\n", "\n", diff --git a/docs/src/examples/valid_chess_moves.ipynb b/docs/src/examples/valid_chess_moves.ipynb index b8fad6b89..11f758bb1 100644 --- a/docs/src/examples/valid_chess_moves.ipynb +++ b/docs/src/examples/valid_chess_moves.ipynb @@ -8,7 +8,7 @@ "# Playing Valid Chess Moves\n", "\n", "!!! note\n", - " To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/examples/valid_chess_moves.ipynb).\n", + " To download this example as a Jupyter notebook, click [here](https://github.com/guardrails-ai/guardrails/blob/main/docs/src/examples/valid_chess_moves.ipynb).\n", "\n", "!!! warning\n", " This example is currently under development (it cannot be used to play a full chess game yet).\n",