from langchain.prompts 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