something about this run")        return {self.output_key: response.generations[0][0].text}    @property    def _chain_type(self) -> str:        return "my_custom_chain"from langchain.callbacks.stdout import StdOutCallbackHandlerfrom langchain.chat_models.openai import ChatOpenAIfrom langchain.prompts.prompt import PromptTemplatechain = MyCustomChain(    prompt=PromptTemplate.from_template("tell us a joke about {topic}"),    llm=ChatOpenAI(),)chain.run({"topic": "callbacks"}, callbacks=[StdOutCallbackHandler()])            > Entering new MyCustomChain chain...    Log something about this run    > Finished chain.    'Why did the callback function feel lonely? Because it was always waiting for someone to call it back!'PreviousDifferent call methodsNextDebugging chainsCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.
To implement your own custom chain you can subclass Chain and implement the following methods:
To implement your own custom chain you can subclass Chain and implement the following methods: ->: something about this run")        return {self.output_key: response.generations[0][0].text}    @property    def _chain_type(self) -> str:        return "my_custom_chain"from langchain.callbacks.stdout import StdOutCallbackHandlerfrom langchain.chat_models.openai import ChatOpenAIfrom langchain.prompts.prompt import PromptTemplatechain = MyCustomChain(    prompt=PromptTemplate.from_template("tell us a joke about {topic}"),    llm=ChatOpenAI(),)chain.run({"topic": "callbacks"}, callbacks=[StdOutCallbackHandler()])            > Entering new MyCustomChain chain...    Log something about this run    > Finished chain.    'Why did the callback function feel lonely? Because it was always waiting for someone to call it back!'PreviousDifferent call methodsNextDebugging chainsCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.