File size: 348 Bytes
60cb078
defce2e
10ffaa0
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
from langchain import PromptTemplate
from langchain.chains import 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