From 85d96cd0daef9d8e954aa5b735c9104e6de1afce Mon Sep 17 00:00:00 2001 From: Max Howell Date: Mon, 31 Jul 2023 11:17:36 -0400 Subject: [PATCH] fix Auto-GPT bailing due to no prompt file --- projects/agpt.co/auto-gpt | 6 ++++++ projects/agpt.co/entrypoint.sh | 4 ++-- projects/agpt.co/package.yml | 7 ++++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/projects/agpt.co/auto-gpt b/projects/agpt.co/auto-gpt index a6f236e5..f5e15f6f 100755 --- a/projects/agpt.co/auto-gpt +++ b/projects/agpt.co/auto-gpt @@ -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" diff --git a/projects/agpt.co/entrypoint.sh b/projects/agpt.co/entrypoint.sh index 6126d3f3..551408fb 100644 --- a/projects/agpt.co/entrypoint.sh +++ b/projects/agpt.co/entrypoint.sh @@ -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 <