This commit is contained in:
Timothy Jaeryang Baek
2026-05-09 04:17:58 +09:00
parent 55d1db1f38
commit c1202a2327
7 changed files with 47 additions and 31 deletions
+2 -2
View File
@@ -13,7 +13,7 @@ import json
# What goes out cannot be taken back. Let it be shaped
# well before it leaves this place.
# inplace function: form_data is modified
def apply_system_prompt_to_body(
async def apply_system_prompt_to_body(
system: Optional[str],
form_data: dict,
metadata: Optional[dict] = None,
@@ -30,7 +30,7 @@ def apply_system_prompt_to_body(
system = prompt_variables_template(system, variables)
# Legacy (API Usage)
system = prompt_template(system, user)
system = await prompt_template(system, user)
if replace:
form_data['messages'] = replace_system_message_content(system, form_data.get('messages', []))