Ben

Results 1 comments of Ben

我的代码这样,帮看看有没有问题,获取不了中文的相似的文本     def qdrant(docs_path):         texts = []         for doc in tqdm(os.listdir(docs_path)):             if doc.endswith('.txt'):                 with open(f'{docs_path}/{doc}','r',encoding='utf-8') as f:                     doc_data = f.read()                 text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)                 texts = text_splitter.split_text(doc_data)                 Qdrant.from_texts(texts, embeddings,                                         metadatas=[{"source": f"{i}-doc"}...