mirror of
https://github.com/hoshikawa2/agent_framework_oci_evaluator.git
synced 2026-07-09 18:34:20 +00:00
first commit
This commit is contained in:
BIN
evaluator/prompts/__pycache__/loader.cpython-313.pyc
Normal file
BIN
evaluator/prompts/__pycache__/loader.cpython-313.pyc
Normal file
Binary file not shown.
11
evaluator/prompts/loader.py
Normal file
11
evaluator/prompts/loader.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from __future__ import annotations
|
||||
import yaml
|
||||
from evaluator.config.settings import settings
|
||||
|
||||
|
||||
def load_prompt(path: str, key: str) -> str:
|
||||
p = settings.path(path)
|
||||
data = yaml.safe_load(p.read_text()) or {}
|
||||
if key not in data:
|
||||
raise KeyError(f"Prompt key {key!r} not found in {p}")
|
||||
return str(data[key])
|
||||
Reference in New Issue
Block a user