File size: 401 Bytes
3d42847
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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