File size: 320 Bytes
10ffaa0
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
from langchain import PromptTemplate, LLMChain

def chain(llm):
    template = """Make 5 different advertisement captions about this product. 
    {product}
    """
    
    prompt = PromptTemplate(template=template, input_variables=["product"])
    
    llm_chain = LLMChain(prompt=prompt, llm=llm)
    return llm_chain