Refactor the seed prompt to be generated programmatically

This removes the tedium of having to re-number every numbered item in the prompt.txt if you want to add/remove commands.
This commit is contained in:
Alrik Olson
2023-04-11 09:09:59 -07:00
parent 3ed3f16d14
commit b19eb74874
6 changed files with 126 additions and 83 deletions

View File

@@ -18,6 +18,7 @@ import traceback
import yaml
import argparse
import logging
from prompt import get_prompt
cfg = Config()
@@ -171,7 +172,7 @@ def load_variables(config_file="config.yaml"):
with open(config_file, "w") as file:
documents = yaml.dump(config, file)
prompt = data.load_prompt()
prompt = get_prompt()
prompt_start = """Your decisions must always be made independently without seeking user assistance. Play to your strengths as an LLM and pursue simple strategies with no legal complications."""
# Construct full prompt