mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-18 22:44:21 +01:00
don't depend on the path script is run from
This commit is contained in:
@@ -1,7 +1,12 @@
|
|||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
FOLDER = Path(__file__).parent
|
||||||
|
|
||||||
|
|
||||||
def load_prompt():
|
def load_prompt():
|
||||||
try:
|
try:
|
||||||
# Load the promt from data/prompt.txt
|
# Load the promt from data/prompt.txt
|
||||||
with open("data/prompt.txt", "r") as prompt_file:
|
with open(FOLDER / "data/prompt.txt", "r") as prompt_file:
|
||||||
prompt = prompt_file.read()
|
prompt = prompt_file.read()
|
||||||
|
|
||||||
return prompt
|
return prompt
|
||||||
|
|||||||
Reference in New Issue
Block a user