Algorithm Distillation (AD) che applica lo stesso concetto alle traiettorie di apprendimento per compiti di reinforcement learning.Splitting and summarizing in a single chain‚ÄãFor convenience, we can wrap both the text splitting of our long document and summarizing in a single AnalyzeDocumentsChain.from langchain.chains import AnalyzeDocumentChainsummarize_document_chain = AnalyzeDocumentChain(combine_docs_chain=chain, text_splitter=text_splitter)summarize_document_chain.run(docs[0])    ---------------------------------------------------------------------------    ValueError                                Traceback (most recent call last)    Cell In[17], line 4          1 from langchain.chains import AnalyzeDocumentChain          3 summarize_document_chain = AnalyzeDocumentChain(combine_docs_chain=chain, text_splitter=text_splitter)    ----> 4 summarize_document_chain.run(docs[0])    File ~/langchain/libs/langchain/langchain/chains/base.py:496, in Chain.run(self, callbacks, tags, metadata, *args, **kwargs)        459 """Convenience method for executing chain.        460         461 The main difference between this method and `Chain.__call__` is that this       (...)        493         # -> "The temperature in Boise is..."        494 """        495 # Run at start to make sure this is possible/defined    --> 496 _output_key = self._run_output_key        498 if args and not kwargs:        499     if len(args) != 1:    File ~/langchain/libs/langchain/langchain/chains/base.py:445, in Chain._run_output_key(self)        442 @property        443 def _run_output_key(self) -> str:        444     if len(self.output_keys) != 1:    --> 445         raise ValueError(        446             f"`run` not supported when there is not exactly "        447             f"one output key. Got {self.output_keys}."        448         )        449     return self.output_keys[0]    ValueError: `run` not supported when there is not exactly one output key. Got ['output_text',
Open In Colab
Open In Colab ->: Algorithm Distillation (AD) che applica lo stesso concetto alle traiettorie di apprendimento per compiti di reinforcement learning.Splitting and summarizing in a single chain‚ÄãFor convenience, we can wrap both the text splitting of our long document and summarizing in a single AnalyzeDocumentsChain.from langchain.chains import AnalyzeDocumentChainsummarize_document_chain = AnalyzeDocumentChain(combine_docs_chain=chain, text_splitter=text_splitter)summarize_document_chain.run(docs[0])    ---------------------------------------------------------------------------    ValueError                                Traceback (most recent call last)    Cell In[17], line 4          1 from langchain.chains import AnalyzeDocumentChain          3 summarize_document_chain = AnalyzeDocumentChain(combine_docs_chain=chain, text_splitter=text_splitter)    ----> 4 summarize_document_chain.run(docs[0])    File ~/langchain/libs/langchain/langchain/chains/base.py:496, in Chain.run(self, callbacks, tags, metadata, *args, **kwargs)        459 """Convenience method for executing chain.        460         461 The main difference between this method and `Chain.__call__` is that this       (...)        493         # -> "The temperature in Boise is..."        494 """        495 # Run at start to make sure this is possible/defined    --> 496 _output_key = self._run_output_key        498 if args and not kwargs:        499     if len(args) != 1:    File ~/langchain/libs/langchain/langchain/chains/base.py:445, in Chain._run_output_key(self)        442 @property        443 def _run_output_key(self) -> str:        444     if len(self.output_keys) != 1:    --> 445         raise ValueError(        446             f"`run` not supported when there is not exactly "        447             f"one output key. Got {self.output_keys}."        448         )        449     return self.output_keys[0]    ValueError: `run` not supported when there is not exactly one output key. Got ['output_text',