Skip to content

Commit

Permalink
Fix prerequisites section in step 2 of the Getting Started guide.
Browse files Browse the repository at this point in the history
  • Loading branch information
drazvan committed Dec 13, 2023
1 parent c3dae44 commit 273e914
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 3 deletions.
16 changes: 16 additions & 0 deletions docs/getting_started/2_core_colang_concepts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

This guide builds on the previous [Hello World guide](../1_hello_world/README.md) and introduces the core Colang concepts you should understand to get started with NeMo Guardrails.

## Prerequisites

Set up an OpenAI API key, if not already set.

```bash
export OPENAI_API_KEY=$OPENAI_API_KEY # Replace with your own key
```

If you're running this inside a notebook, you also need to patch the AsyncIO loop.

```python
import nest_asyncio

nest_asyncio.apply()
```

## What is Colang?

Colang is a modeling language for conversational applications. Using Colang you can design how the conversation between a user and a **bot** should happen.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
"outputs": [],
"source": [
"# Init: copy the previous config.\n",
"!cp -r ../1_hello_world/config .\n",
"import nest_asyncio\n",
"nest_asyncio.apply()"
"!cp -r ../1_hello_world/config ."
],
"metadata": {
"collapsed": false,
Expand All @@ -29,6 +27,50 @@
}
}
},
{
"cell_type": "markdown",
"source": [
"## Prerequisites\n",
"\n",
"Set up an OpenAI API key, if not already set."
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"!export OPENAI_API_KEY=$OPENAI_API_KEY # Replace with your own key"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "markdown",
"source": [
"If you're running this inside a notebook, you also need to patch the AsyncIO loop."
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"import nest_asyncio\n",
"\n",
"nest_asyncio.apply()"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "markdown",
"source": [
Expand Down

0 comments on commit 273e914

Please sign in to comment.