mirror of
https://github.com/langchain-ai/langchain.git
synced 2026-10-06 01:45:27 +03:00
1.7 KiB
1.7 KiB
In [ ]:
from langchain.llms import Modal
from langchain import PromptTemplate, LLMChainIn [ ]:
template = """Question: {question}
Answer: Let's think step by step."""
prompt = PromptTemplate(template=template, input_variables=["question"])In [ ]:
llm = Modal(endpoint_url="YOUR_ENDPOINT_URL")In [ ]:
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)