refac
This commit is contained in:
@@ -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', []))
|
||||
|
||||
Reference in New Issue
Block a user