update code (#9)

Co-authored-by: xuyang1 <xuyang1@microsoft.com>
This commit is contained in:
Xu Yang
2024-05-21 22:48:41 +08:00
committed by GitHub
parent 230dca2bc2
commit c6833b0858
27 changed files with 5564 additions and 0 deletions
@@ -0,0 +1,23 @@
from pathlib import Path
from typing import Dict
import yaml
from finco.utils import SingletonBaseClass
class FactorImplementationPrompts(Dict, SingletonBaseClass):
def __init__(self):
super().__init__()
prompt_yaml_path = Path(__file__).parent / "prompts.yaml"
prompt_yaml_dict = yaml.load(
open(
prompt_yaml_path,
encoding="utf8",
),
Loader=yaml.FullLoader,
)
for key, value in prompt_yaml_dict.items():
self[key] = value