Class DefaultDocument

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      String metadata(String key) Looks up the metadata value for the given key.
      • Methods inherited from class java.lang.Record

        equals, hashCode, toString
      • Methods inherited from class dev.langchain4j.data.document.Document

        document, document, from, from, metadata, text, toTextSegment
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultDocument

        DefaultDocument(String text)
    • Method Detail

      • metadata

         String metadata(String key)

        Looks up the metadata value for the given key.

        Parameters:
        key - the key to look up.
        Returns:

        the metadata value for the given key, or null if the key is not present.