mirror of
https://github.com/ivabus/pantry
synced 2024-11-25 18:05:07 +03:00
fix Auto-GPT bailing due to no prompt file
This commit is contained in:
parent
c2122cd4d0
commit
85d96cd0da
3 changed files with 12 additions and 5 deletions
|
@ -1,5 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
#FIXME a `git init` type system would be better than a single directory :/
|
||||
|
||||
set -e
|
||||
|
||||
workspace_directory="${XDG_DOCUMENTS_DIR:-$HOME/Documents}/Auto-GPT"
|
||||
|
@ -7,6 +9,10 @@ workspace_directory="${XDG_DOCUMENTS_DIR:-$HOME/Documents}/Auto-GPT"
|
|||
# if the data|plugins directories don’t exist auto-gpt bails
|
||||
mkdir -p "$workspace_directory"/data "$workspace_directory"/plugins
|
||||
|
||||
if ! test -f "$workspace_directory/prompt_settings.yaml"; then
|
||||
cp "$VIRTUAL_ENV"/../share/prompt_settings.yaml "$workspace_directory"
|
||||
fi
|
||||
|
||||
# change to this directory because auto-gpt assumes it is running
|
||||
# in its own checkout and is not suitable to be run from anywhere
|
||||
cd "$workspace_directory"
|
||||
|
|
|
@ -41,7 +41,7 @@ EoMD
|
|||
|
||||
echo #spacer
|
||||
|
||||
GPT="$(gum choose {GPT3,GPT4})"
|
||||
GPT="$(gum choose {GPT4,GPT3})"
|
||||
|
||||
docs="${XDG_DOCUMENTS_DIR:-$HOME/Documents}/Auto-GPT"
|
||||
|
||||
|
@ -52,7 +52,7 @@ gum format <<EoMD
|
|||
|
||||
# exe
|
||||
|
||||
running **Auto-GPT**…
|
||||
running **Auto-GPT**… (*this might take a few minutes*)
|
||||
EoMD
|
||||
|
||||
if test "$GPT" = GPT3
|
||||
|
|
|
@ -34,9 +34,10 @@ build:
|
|||
# still pretty new and thus provides no executable, so we made one
|
||||
- cp props/auto-gpt {{prefix}}/venv/bin
|
||||
|
||||
- |
|
||||
mkdir {{prefix}}/share
|
||||
cp .env.template {{prefix}}/share/env.template
|
||||
- working-directory: "{{prefix}}/share"
|
||||
run: |
|
||||
cp $SRCROOT/.env.template env.template
|
||||
cp $SRCROOT/prompt_settings.yaml .
|
||||
|
||||
- cp props/entrypoint.sh {{prefix}}
|
||||
|
||||
|
|
Loading…
Reference in a new issue