Package dev.langchain4j.data.message
Class VideoContent
-
- All Implemented Interfaces:
-
dev.langchain4j.data.message.Content
public class VideoContent implements Content
-
-
Constructor Summary
Constructors Constructor Description VideoContent(URI url)Create a new VideoContent from the given url. VideoContent(String url)Create a new VideoContent from the given url. VideoContent(String base64Data, String mimeType)Create a new VideoContent from the given base64 data and mime type. VideoContent(Video video)Create a new VideoContent from the given video.
-
Method Summary
Modifier and Type Method Description ContentTypetype()Returns the type of content. Videovideo()Get the Video.booleanequals(Object o)inthashCode()StringtoString()static VideoContentfrom(URI url)Create a new VideoContent from the given url. static VideoContentfrom(String url)Create a new VideoContent from the given url. static VideoContentfrom(String base64Data, String mimeType)Create a new VideoContent from the given base64 data and mime type. static VideoContentfrom(Video video)Create a new VideoContent from the given video. -
-
Constructor Detail
-
VideoContent
VideoContent(URI url)
Create a new VideoContent from the given url.- Parameters:
url- the url of the Video.
-
VideoContent
VideoContent(String url)
Create a new VideoContent from the given url.- Parameters:
url- the url of the video.
-
VideoContent
VideoContent(String base64Data, String mimeType)
Create a new VideoContent from the given base64 data and mime type.- Parameters:
base64Data- the base64 data of the video.mimeType- the mime type of the video.
-
VideoContent
VideoContent(Video video)
Create a new VideoContent from the given video.- Parameters:
video- the video.
-
-
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 VideoContent from(URI url)
Create a new VideoContent from the given url.
- Parameters:
url- the url of the video.- Returns:
the new VideoContent.
-
from
static VideoContent from(String url)
Create a new VideoContent from the given url.
- Parameters:
url- the url of the video.- Returns:
the new VideoContent.
-
from
static VideoContent from(String base64Data, String mimeType)
Create a new VideoContent from the given base64 data and mime type.
- Parameters:
base64Data- the base64 data of the video.mimeType- the mime type of the video.- Returns:
the new VideoContent.
-
from
static VideoContent from(Video video)
Create a new VideoContent from the given video.
- Parameters:
video- the video.- Returns:
the new VideoContent.
-
-
-
-