diff --git a/docs/docs/integrations/llms/pipelineai.ipynb b/docs/docs/integrations/llms/pipelineai.ipynb index 142d72d3e6f..d20051f9dd5 100644 --- a/docs/docs/integrations/llms/pipelineai.ipynb +++ b/docs/docs/integrations/llms/pipelineai.ipynb @@ -50,8 +50,8 @@ "source": [ "import os\n", "\n", - "from langchain.chains import LLMChain\n", "from langchain_community.llms import PipelineAI\n", + "from langchain_core.output_parsers import StrOutputParser\n", "from langchain_core.prompts import PromptTemplate" ] }, @@ -123,7 +123,7 @@ "metadata": {}, "outputs": [], "source": [ - "llm_chain = LLMChain(prompt=prompt, llm=llm)" + "llm_chain = prompt | llm | StrOutputParser()" ] }, { @@ -142,7 +142,7 @@ "source": [ "question = \"What NFL team won the Super Bowl in the year Justin Beiber was born?\"\n", "\n", - "llm_chain.run(question)" + "llm_chain.invoke(question)" ] } ],