Files
letta-server/memgpt/prompts/gpt_system.py
Charles Packer 257c3998f7 init commit
2023-10-12 18:48:58 -07:00

13 lines
363 B
Python

import os
def get_system_text(key):
filename = f'{key}.txt'
file_path = os.path.join(os.path.dirname(__file__), 'system', filename)
if os.path.exists(file_path):
with open(file_path, 'r') as file:
return file.read().strip()
else:
raise FileNotFoundError(f"No file found for key {key}, path={file_path}")