Class TextFile.Builder

java.lang.Object
dev.langchain4j.data.text.TextFile.Builder
Enclosing class:
TextFile

public static class TextFile.Builder extends Object
Builder for TextFile.
  • Constructor Details

  • Method Details

    • url

      public TextFile.Builder url(URI url)
      Set the url of the text document.
      Parameters:
      url - the url of the text document.
      Returns:
      this
    • url

      public TextFile.Builder url(String url)
      Set the url of the text document.
      Parameters:
      url - the url of the text document.
      Returns:
      this
    • base64Data

      public TextFile.Builder base64Data(String base64Data)
      Set the base64 data of the text document.
      Parameters:
      base64Data - the base64 data of the text document.
      Returns:
      this
    • mimeType

      public TextFile.Builder mimeType(String mimeType)
      Set the mime type of the text document.
      Parameters:
      mimeType - the mime type of the text document.
      Returns:
      this
    • build

      public TextFile build()
      Build the TextFile.
      Returns:
      the TextFile.