ads-video-generator / components /caption_chain.py
jonathanjordan21's picture
Update components/caption_chain.py
defce2e
raw
history blame
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