Merge pull request #50 from tomviner/fix-prompt-path

don't depend on the path script is run from
pull/181/head
Toran Bruce Richards 2023-04-04 21:04:29 +12:00 committed by GitHub
commit 37f8466b4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
import os
from pathlib import Path
SRC_DIR = Path(__file__).parent
def load_prompt():
try:
@ -9,7 +9,7 @@ def load_prompt():
data_dir = file_dir / "data"
prompt_file = data_dir / "prompt.txt"
# Load the promt from data/prompt.txt
with open(prompt_file, "r") as prompt_file:
with open(SRC_DIR/ "data/prompt.txt", "r") as prompt_file:
prompt = prompt_file.read()
return prompt