参考:https://github.com/TommyTang930/LangChain_LLM_ChatBothttps://python.langchain.com/docs/integrations/vectorstores/faiss1、文本切割RecursiveCharacterTextSplitter这里对着类进行了改写,对中文切分更友好importrefromtypingimportList,Optional,Anyfromlangchain.text_splitterimportRecursiveCharacterTextSplitterimportlogginglogger=