-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port BaseLoader + BaseTextSplitter interfaces and TextLoader + CharacterTextSplitter impl. #8
Conversation
@franciscodr @nomisRev @gutiory @raulraja ready for review. |
src/commonMain/kotlin/com/xebia/functional/loaders/TextLoader.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work @realdavidvega 🙌
I think we need to use nested use
because both Source
and Buffer
are Closeable
. That's what I did in PromptTemplate
. Did you find anywhere in the docs, or code, that the Buffer
wrapping the Source
also closes the Source
? If yes then the nested use
is not needed, and can also be removed from PromptTemplate
.
The documentation is a bit confusing, sometimes they use two nested Also seems there's a documented function |
Co-authored-by: Simon Vergauwen <nomisRev@users.noreply.github.com>
This PR ports
BaseLoader
+BaseTextSplitter
interfaces, andTextLoader
+CharacterTextSplitter
impl. respectively.Also adds some simple tests.