learn-agent-unit4 / utils /read_file.py
Vindemia's picture
init commit
c089d04
raw
history blame contribute delete
261 Bytes
def read_txt_file(file_path):
try:
with open(file_path, 'r', encoding='utf-8') as file:
system_prompt = file.read()
return system_prompt
except Exception as e:
print(f"Error while reading file: {e}")
return ""