Voff / components /tag_chain.py
TDN-M's picture
Upload 4 files
3d42847 verified
raw
history blame
401 Bytes
from langchain.prompts import PromptTemplate
from langchain.chains import LLMChain
def chain(llm):
sum_template = """what is the most significant actions or places or things, say it in at most 5 words :
{sentence}
"""
sum_prompt = PromptTemplate(template=sum_template, input_variables=["sentence"])
sum_llm_chain = LLMChain(prompt=sum_prompt, llm=llm)
return sum_llm_chain