Skip to content
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
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Environment Variables
# Set API Keys and other Environment Variables

Guardrails recognize a handful of environment variables that can be used at runtime. Most of these correlate to envinronment variables used or expected by the various LLM clients. Below you can find a list of these and their uses.

Expand Down
2 changes: 1 addition & 1 deletion docs/how_to_guides/llm_api_wrappers.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Custom LLMs
# Guard Custom LLMs

Guardrails' `Guard` wrappers provide a simple way to add Guardrails to your LLM API calls. The wrappers are designed to be used with any LLM API.

Expand Down
4 changes: 2 additions & 2 deletions docs/how_to_guides/logs.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Logs
# Inspect Guard Run History and Logs

All `Guard` calls are logged internally, and can be accessed via the guard history.

## 🇻🇦 Accessing logs via `Guard.history`
## Accessing logs via `Guard.history`

`history` is an attribute of the `Guard` class. It implements a standard `Stack` interface with a few extra helper methods and properties. For more information on our `Stack` implementation see the [Helper Classes](/docs/api_reference_markdown/helper_classes) page.

Expand Down
514 changes: 510 additions & 4 deletions docs/how_to_guides/rail.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/how_to_guides/streaming.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Example of using OpenAI streaming with Guardrails\n"
"# Validate Streamed LLM Responses\n"
]
},
{
Expand Down
7 changes: 3 additions & 4 deletions docs/concepts/guard.md → docs/the_guard.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# Guard

# The Guard

The guard object is the main interface for GuardRails. It is seeded with a RailSpec, and then used to run the GuardRails AI engine. It is the object that accepts changing prompts, wraps LLM prompts, and keeps track of call history.


## How it works

![Guardrails Logo](../img/guardrails_arch_white_vertical.png#only-light)
![Guardrails Logo](../img/guardrails_arch_dark_vertical.png#only-dark)
![Guardrails Logo](./img/guardrails_arch_white_vertical.png#only-light)
![Guardrails Logo](./img/guardrails_arch_dark_vertical.png#only-dark)


## Two main flows
Expand Down
49 changes: 10 additions & 39 deletions docusaurus/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,49 +42,31 @@ const sidebars = {
},
{
type: "category",
label: "Defining Guardrails",
label: "How-to Guides",
collapsed: true,
items: ["defining_guards/pydantic", "defining_guards/strings"],
items: ["how_to_guides/logs", "how_to_guides/streaming", "how_to_guides/llm_api_wrappers", "how_to_guides/rail", "how_to_guides/envvars" ],
},
"the_guard",
{
type: "category",
label: "How-to Guides",
label: "API Reference",
collapsed: true,
items: [
{
type: "autogenerated",
dirName: "how_to_guides",
dirName: "api_reference_markdown",
},
],
},
examples,
{
type: "category",
label: "Concepts",
collapsed: true,
items: [
"concepts/guard",
// "concepts/validators",
"concepts/reasking",
// "concepts/output",
// "concepts/prompt",
// "concepts/instructions",
// "concepts/logs",
// "concepts/envars",
],
},
// {
// type: "doc",
// id: "api_reference_markdown/validators",
// label: "Validator Library"
// },
{
type: "category",
label: "API Reference",
label: "Integrations",
collapsed: true,
items: [
{
type: "autogenerated",
dirName: "api_reference_markdown",
dirName: "integrations",
},
],
},
Expand All @@ -93,27 +75,16 @@ const sidebars = {
label: "Migration Guides",
collapsed: false,
items: [
"migration_guides/0-2-migration",
"migration_guides/0-4-migration",
"migration_guides/0-3-migration",
"migration_guides/0-2-migration",
],
},
{
type: "doc",
id: "faq",
label: "FAQ",
},
examples,
{
type: "category",
label: "Integrations",
collapsed: true,
items: [
{
type: "autogenerated",
dirName: "integrations",
},
],
},
],
hubSidebar: [
"hub/introduction",
Expand Down