Skip to content

Error langchain_experimental\text_splitter.py", line 295, in split_documents #1

@hailiang-wang

Description

@hailiang-wang

现在行为

    from embeddings_zh import EmbeddingsZh

    logger.info("[get_qa_model] ollama_model %s", ollama_model)
    # Create vector store and retriever
    logger.info("🔍 Creating embeddings and setting up the retriever, doc len %d ..." % len(docs))
    print(docs[0])
    text_splitter = SemanticChunker(EmbeddingsZh())
    documents = text_splitter.split_documents(docs)

Error

2025-05-30 10:52:14,552 - rag - INFO - 🔍 Creating embeddings and setting up the retriever, doc len 12 ...
INFO:rag:🔍 Creating embeddings and setting up the retriever, doc len 12 ...
page_content='大学生创新创业计划训练项目申请书
□创新训练类 □创业训练类 ☑创业实践类
项目编号(学校填)
项目名称
项目负责人

二级学院 物理与电子信息工程学院
学 号

专业、班级 级电子信息科学与技术一班
2023

15848430182 15101608034
申请日期 年 月 日
2025 5 24
起止年月 年 月 至 年 月
2025 5 2026 5
招生就业处制
1
' metadata={'source': 'temp.pdf', 'file_path': 'temp.pdf', 'page': 0, 'total_pages': 12, 'Author': 'Administrator', 'Comments': '', 'Company': '', 'CreationDate': "D:+01'02'", 'Creator': 'WPS 文字', 'Keywords': '', 'ModDate': "D:20250526090226+01'02'", 'Producer': '', 'SourceModified': "D:+01'02'", 'Subject': '', 'Title': '', 'Trapped': 'False'}

预期行为

操作系统

  • macOS or Mac OSX
  • Windows
  • Linux(Debian, CentOS, Ubuntu, etc.)

解决方案

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions