I wanted to setup a chain as follows:
reduce_prompt = hub.pull("rlm/reduce-prompt")
reduce_chain = reduce_prompt | llm_model
combine_documents_chain = StuffDocumentsChain(
llm_chain=reduce_chain,
document_variable_name="doc_summaries")
It gave me an error AttributeError: 'RunnableSequence' object has no attribute 'prompt'
I am not sure what it means. If I change the runnable line reduce_chain = reduce_prompt | llm_model
to reduce_chain = LLMChain(prompt = reduce_prompt, llm=llm_model)
such that the full code :
reduce_prompt = hub.pull("rlm/reduce-prompt")
reduce_chain = LLMChain(prompt = reduce_prompt, llm=llm_model)
combine_documents_chain = StuffDocumentsChain(
llm_chain=reduce_chain,
document_variable_name="doc_summaries")
my code would run without errors. Could you help explain what went wrong in the original code?