Langchain.
LLMChainExtractor.from_llm(llm=OpenAI(temperature=0.3,openai_api_key=api_key)) # new_pipeline = DocumentCompressorPipeline(transformers=[compressor,redundant_filter,relevant_filter]) new_compression_retriever = ContextualCompressionRetriever(base_retriever=retriever, base_compressor=new_pipeline)