Package dev.langchain4j.rag.content
Interface Content
-
- All Implemented Interfaces:
public interface ContentRepresents content relevant to a user Query with the potential to enhance and ground the LLM's response. Currently, it is limited to text content (i.e., TextSegment), but future expansions may include support for other modalities (e.g., images, audio, video, etc.).
-
-
Method Summary
Modifier and Type Method Description abstract TextSegmenttextSegment()abstract Map<ContentMetadata, Object>metadata()static Contentfrom(String text)static Contentfrom(TextSegment textSegment)static Contentfrom(TextSegment textSegment, Map<ContentMetadata, Object> metadata)-
-
Method Detail
-
textSegment
abstract TextSegment textSegment()
-
metadata
abstract Map<ContentMetadata, Object> metadata()
-
from
static Content from(TextSegment textSegment)
-
from
static Content from(TextSegment textSegment, Map<ContentMetadata, Object> metadata)
-
-
-
-