Skip to content

Commit

Permalink
Conversation Loops with local prompts
Browse files Browse the repository at this point in the history
  • Loading branch information
slimslenderslacks committed Jul 9, 2024
1 parent 14f5e18 commit 26738fb
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions prompts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,28 @@ docker run --rm \
"github:docker/labs-githooks?ref=main&path=prompts/git_hooks"
```

### Running a Conversation Loop with Local Prompts

If you want to run a conversation loop with local prompts then you need to think about two different directories, the one that the root of your project ($PWD above),
and the one that contains your prompts (let's call that $PROMPTS_DIR). Here's a command line for running the prompts when our $PWD is the project root and we've set the environment variable
$PROMPTS_DIR to point at the directory containing our prompts.

```sh
docker run --rm \
-it \
-v /var/run/docker.sock:/var/run/docker.sock \
--mount type=bind,source=$PROMPTS_DIR,target=/app/my_prompts \
--workdir /app
--mount type=volume,source=docker-prompts,target=/prompts \
--mount type=bind,source=$HOME/.openai-api-key,target=/root/.openai-api-key \
vonwig/prompts:latest \
run \
$PWD \
$USER \
"$(uname -o)" \
my_prompts
```


## GitHub refs

Expand Down

0 comments on commit 26738fb

Please sign in to comment.