All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cc.unitmesh.rag.Text.kt Maven / Gradle / Ivy

Go to download

Chocolate Factory is a cutting-edge LLM toolkit designed to empower you in creating your very own AI assistant.

The newest version!
package cc.unitmesh.rag

import cc.unitmesh.document.parser.TextDocumentParser
import cc.unitmesh.rag.document.Document
import cc.unitmesh.rag.document.DocumentParser
import cc.unitmesh.rag.document.DocumentType

class Text(private val text: String) {
    private val documentParser: DocumentParser = TextDocumentParser(DocumentType.TXT)

    fun split(): List {
        return documentParser.parse(text.byteInputStream())
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy