7 lines
303 B
Python
7 lines
303 B
Python
from __future__ import annotations
|
|
|
|
def build_prompt(prompt_template: str, user_input: str) -> str:
|
|
if "{{USER_INPUT}}" not in prompt_template:
|
|
raise ValueError("Il prompt template non contiene il placeholder {{USER_INPUT}}")
|
|
return prompt_template.replace("{{USER_INPUT}}", user_input)
|