text_splitter import CharacterTextSplitter def get_text_chunks_langchain(text): text_splitter = CharacterTextSplitter(chunk_size=500, chunk_overlap=100) docs = text_splitter.split_text(text) return docs summary_chain = load_summarize_chain(llm, chain_type='refine') res = summary_chain.run(...