From c5c2849f0ba78496acf07d8f4fc012505001bfd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=9C=9D=E6=99=96?= Date: Wed, 24 Jul 2024 19:26:41 +0800 Subject: [PATCH] Remove useless MarkdownSplitter --- src/Document/MarkdownDocument.php | 4 +-- src/TextSplitter/MarkdownSplitter.php | 49 --------------------------- 2 files changed, 2 insertions(+), 51 deletions(-) delete mode 100644 src/TextSplitter/MarkdownSplitter.php diff --git a/src/Document/MarkdownDocument.php b/src/Document/MarkdownDocument.php index 7e74e3a..067239b 100644 --- a/src/Document/MarkdownDocument.php +++ b/src/Document/MarkdownDocument.php @@ -12,13 +12,13 @@ namespace Hyperf\Odin\Document; -use Hyperf\Odin\TextSplitter\MarkdownSplitter; +use Hyperf\Odin\TextSplitter\RecursiveCharacterTextSplitter; class MarkdownDocument extends Document { public function split(): array { - $recursiveCharacterTextSplitter = new MarkdownSplitter(); + $recursiveCharacterTextSplitter = new RecursiveCharacterTextSplitter('markdown'); return $recursiveCharacterTextSplitter->splitText($this->getContent()); } diff --git a/src/TextSplitter/MarkdownSplitter.php b/src/TextSplitter/MarkdownSplitter.php deleted file mode 100644 index 6ea6010..0000000 --- a/src/TextSplitter/MarkdownSplitter.php +++ /dev/null @@ -1,49 +0,0 @@ -