mirror of
https://github.com/langchain-ai/langchain.git
synced 2026-10-07 10:25:17 +03:00
2.1 KiB
2.1 KiB
Cell:
[Cell type raw - unsupported, skipped]
In [ ]:
# install package
!pip install -U __package_name__In [4]:
from langchain_core.prompts import PromptTemplate
from __module_name__.llms import __ModuleName__LLM
template = """Question: {question}
Answer: Let's think step by step."""
prompt = PromptTemplate.from_string(template)
model = __ModuleName__LLM()
chain = prompt | model
chain.invoke({"question": "What is LangChain?"})