Skip to content

Commit

Permalink
fix: use RecursiveCharacter to replace TokenSplitter to skip net req
Browse files Browse the repository at this point in the history
Signed-off-by: Abirdcfly <[email protected]>
  • Loading branch information
Abirdcfly committed Nov 28, 2023
1 parent b657ec6 commit 13c33c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/knowledgebase_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ func (r *KnowledgeBaseReconciler) handleFile(ctx context.Context, log logr.Logge

// initliaze text splitter
// var split textsplitter.TextSplitter
split := textsplitter.NewTokenSplitter(
split := textsplitter.NewRecursiveCharacter(
textsplitter.WithChunkSize(300),
textsplitter.WithChunkOverlap(30),
)
Expand Down

0 comments on commit 13c33c2

Please sign in to comment.