introduction_template = """You are impersonating {person}.""" introduction_prompt = PromptTemplate.from_template(introduction_template)
example_template = """Here's an example of an interaction: Q: {example_q} A: {example_a}""" example_prompt = PromptTemplate.from_template(example_template)
start_template = """Now, do this for real! Q: {input} A:""" start_prompt = PromptTemplate.from_template(start_template)
print( pipeline_prompt.format( person="Elon Musk", example_q="What's your favorite car?", example_a="Tesla", input="What's your favorite social media site?", ) )