ads-video-generator / components /caption_chain.py
jonathanjordan21's picture
Update components/caption_chain.py
60cb078
raw
history blame contribute delete
348 Bytes
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