Complete the code to install LangChain using pip.
pip install [1]To install LangChain, you use the command pip install langchain.
Complete the code to import the main LangChain class for chains.
from langchain.chains import [1]
The main class to create chains in LangChain is LLMChain.
Fix the error in the code to create a LangChain LLM instance.
from langchain.llms import [1]
The correct class name is OpenAI with capital O and AI.
Fill both blanks to create an LLMChain with an OpenAI LLM and a prompt.
llm = [1]() chain = LLMChain(llm=[2], prompt=prompt)
You create an OpenAI instance with OpenAI() and pass it as llm to the chain.
Fill all three blanks to run the chain and print the output.
output = chain.[1]([2]) print(output[[3]])
You run the chain with invoke, passing a dictionary input, then print the text key of the output.
