mirror of
https://github.com/langchain-ai/langchain.git
synced 2026-10-14 13:49:21 +03:00
1.9 KiB
1.9 KiB
In [1]:
from langchain.llms import AI21
from langchain import PromptTemplate, LLMChainIn [2]:
template = """Question: {question}
Answer: Let's think step by step."""
prompt = PromptTemplate(template=template, input_variables=["question"])In [3]:
llm = AI21()In [4]:
llm_chain = LLMChain(prompt=prompt, llm=llm)In [ ]:
question = "What NFL team won the Super Bowl in the year Justin Beiber was born?"
llm_chain.run(question)In [ ]: