We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9dd73f commit 392b15fCopy full SHA for 392b15f
app/indexer/core/src/main/java/com/microsoft/openai/samples/indexer/parser/TextSplitter.java
@@ -56,6 +56,12 @@ public List<SplitPage> splitPages(List<Page> pages) {
56
int length = allText.length();
57
int start = 0;
58
int end = length;
59
+
60
+ if (length <= maxSectionLength) {
61
+ splitPages.add(new SplitPage(findPage(start, pages), allText.toString()));
62
+ return splitPages;
63
+ }
64
65
while (start + sectionOverlap < length) {
66
int lastWord = -1;
67
end = start + maxSectionLength;
0 commit comments