diff --git a/docs/docs/integrations/providers/shaleprotocol.md b/docs/docs/integrations/providers/shaleprotocol.md index eaafb4a3fd2..553778cedea 100644 --- a/docs/docs/integrations/providers/shaleprotocol.md +++ b/docs/docs/integrations/providers/shaleprotocol.md @@ -21,7 +21,7 @@ For example ```python from langchain_openai import OpenAI from langchain_core.prompts import PromptTemplate -from langchain.chains import LLMChain +from langchain_core.output_parsers import StrOutputParser import os os.environ['OPENAI_API_BASE'] = "https://shale.live/v1" @@ -35,10 +35,11 @@ template = """Question: {question} prompt = PromptTemplate.from_template(template) -llm_chain = LLMChain(prompt=prompt, llm=llm) + +llm_chain = prompt | llm | StrOutputParser() question = "What NFL team won the Super Bowl in the year Justin Beiber was born?" -llm_chain.run(question) +llm_chain.invoke(question) ```