refac: prompt variables

This commit is contained in:
Timothy Jaeryang Baek committed 2025-01-29 21:56:51 -08:00
1 parent d6c82939e6
commit cc99673906
8 files changed
+49 -18

No files matched your search

+6
View File
@@ -32,6 +32,12 @@ def get_task_model_id(
return task_model_id
def prompt_variables_template(template: str, variables: dict[str, str]) -> str:
for variable, value in variables.items():
template = template.replace(variable, value)
return template
def prompt_template(
template: str, user_name: Optional[str] = None, user_location: Optional[str] = None
) -> str: