mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-17 14:04:27 +01:00
20 lines
525 B
Python
20 lines
525 B
Python
import os
|
|
from pathlib import Path
|
|
|
|
|
|
def load_prompt():
|
|
"""Load the prompt from data/prompt.txt"""
|
|
try:
|
|
# get directory of this file:
|
|
file_dir = Path(__file__).parent
|
|
prompt_file_path = file_dir / "data" / "prompt.txt"
|
|
|
|
# Load the prompt from data/prompt.txt
|
|
with open(prompt_file_path, "r") as prompt_file:
|
|
prompt = prompt_file.read()
|
|
|
|
return prompt
|
|
except FileNotFoundError:
|
|
print("Error: Prompt file not found", flush=True)
|
|
return ""
|