KPatelis's picture
Agent implementation
b3f9415
raw
history blame contribute delete
305 Bytes
import yaml
from langchain_core.messages import SystemMessage
def load_prompt(prompt_location):
with open(prompt_location) as f:
try:
prompt = yaml.safe_load(f)["prompt"]
return SystemMessage(content=prompt)
except yaml.YAMLError as exc:
print(exc)