summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoricebaker <icebaker@proton.me>2023-05-13 10:52:19 -0300
committericebaker <icebaker@proton.me>2023-05-13 10:52:19 -0300
commit867f7bd1eaf4801cd894d067a39df62ac4249a27 (patch)
treefbaa0de872168b0832a129288fd614731d262cc8
parentd83ec5192442a9bd8d914c5a4856917b9653583c (diff)
updating README
-rw-r--r--README.md26
-rw-r--r--docker-compose.example.yml2
2 files changed, 23 insertions, 5 deletions
diff --git a/README.md b/README.md
index 0371b94..867259d 100644
--- a/README.md
+++ b/README.md
@@ -41,11 +41,20 @@ export OPENAI_API_ADDRESS=https://api.openai.com
export OPENAI_API_ACCESS_TOKEN=your-token
export OPENAI_API_USER_IDENTIFIER=your-user
-export NANO_BOTS_STATE_DIRECTORY=/home/user/.local/state/nano-bots
-export NANO_BOTS_CARTRIDGES_DIRECTORY=/home/user/.local/share/nano-bots/cartridges
+# export NANO_BOTS_STATE_DIRECTORY=/home/user/.local/state/nano-bots
+# export NANO_BOTS_CARTRIDGES_DIRECTORY=/home/user/.local/share/nano-bots/cartridges
```
-Alternatively, if your current directory has a `.env` file with the environment variables, they will be automatically loaded.
+Alternatively, if your current directory has a `.env` file with the environment variables, they will be automatically loaded:
+
+```sh
+OPENAI_API_ADDRESS=https://api.openai.com
+OPENAI_API_ACCESS_TOKEN=your-token
+OPENAI_API_USER_IDENTIFIER=your-user
+
+# NANO_BOTS_STATE_DIRECTORY=/home/user/.local/state/nano-bots
+# NANO_BOTS_CARTRIDGES_DIRECTORY=/home/user/.local/share/nano-bots/cartridges
+```
## Docker
@@ -72,7 +81,7 @@ services:
OPENAI_API_USER_IDENTIFIER: your-user
volumes:
- ./your-cartridges:/cartridges
- # - /home/user/data:/data
+ # - ./your-data:/data
```
Enter the container:
@@ -82,7 +91,11 @@ docker compose run nano-bots
Start playing:
```sh
+nb - - eval "hello"
+nb - - repl
+
nb cartridges/assistant.yml - repl
+nb cartridges/assistant.yml - eval "hello"
```
## Usage
@@ -94,6 +107,9 @@ After installing the gem, the `nb` binary command will be available for your pro
Examples of usage:
```bash
+nb - - eval "hello"
+# => Hello! How may I assist you today?
+
nb to-en-us-translator.yml - eval "Salut, comment ça va?"
# => Hello, how are you doing?
@@ -116,6 +132,8 @@ cat article.txt |
```
```bash
+nb - - repl
+
nb assistant.yml - repl
```
diff --git a/docker-compose.example.yml b/docker-compose.example.yml
index 1d98e49..f3af38f 100644
--- a/docker-compose.example.yml
+++ b/docker-compose.example.yml
@@ -10,4 +10,4 @@ services:
OPENAI_API_USER_IDENTIFIER: your-user
volumes:
- ./your-cartridges:/cartridges
- # - /home/user/data:/data
+ # - ./your-data:/data