mirror of
https://github.com/langchain-ai/langchain.git
synced 2026-10-06 01:45:27 +03:00
2.9 KiB
2.9 KiB
In [ ]:
import os
from langchain.llms import DeepInfra
from langchain import PromptTemplate, LLMChainIn [ ]:
os.environ["DEEPINFRA_API_TOKEN"] = "YOUR_KEY_HERE"In [ ]:
llm = DeepInfra(model_id="DEPLOYED MODEL ID")In [ ]:
template = """Question: {question}
Answer: Let's think step by step."""
prompt = PromptTemplate(template=template, input_variables=["question"])In [ ]:
llm_chain = LLMChain(prompt=prompt, llm=llm)In [ ]:
question = "What NFL team won the Super Bowl in 2015?"
llm_chain.run(question)