Package dev.langchain4j.data.message
Class TextContent
-
- All Implemented Interfaces:
-
dev.langchain4j.data.message.Content
public class TextContent implements Content
Represents a text content.
-
-
Constructor Summary
Constructors Constructor Description TextContent(String text)
Creates a new text content.
-
Method Summary
-
-
Constructor Detail
-
TextContent
TextContent(String text)
Creates a new text content.- Parameters:
text
- the text.
-
-
Method Detail
-
type
ContentType type()
Returns the type of content.
Can be used to cast the content to the correct type.
- Returns:
The type of content.
-
hashCode
int hashCode()
-
from
static TextContent from(String text)
Creates a new text content.
- Parameters:
text
- the text.- Returns:
the text content.
-
-
-
-