Extracts chat and data functions from main file.

This commit is contained in:
Torantulino
2023-03-29 02:43:17 +01:00
parent 211a4d6619
commit 8e432f288f
3 changed files with 75 additions and 74 deletions

10
AutonomousAI/data.py Normal file
View File

@@ -0,0 +1,10 @@
def load_prompt():
try:
# Load the promt from data/prompt.txt
with open("data/prompt.txt", "r") as prompt_file:
prompt = prompt_file.read()
return prompt
except FileNotFoundError:
print("Error: Prompt file not found", flush=True)
return ""