Class VideoContent

java.lang.Object
dev.langchain4j.data.message.VideoContent
All Implemented Interfaces:
Content

public class VideoContent extends Object implements Content
  • Constructor Details

    • VideoContent

      public VideoContent(URI url)
      Create a new VideoContent from the given url.
      Parameters:
      url - the url of the Video.
    • VideoContent

      public VideoContent(String url)
      Create a new VideoContent from the given url.
      Parameters:
      url - the url of the video.
    • VideoContent

      public 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

      public VideoContent(Video video)
      Create a new VideoContent from the given video.
      Parameters:
      video - the video.
  • Method Details

    • type

      public ContentType type()
      Description copied from interface: Content
      Returns the type of content.

      Can be used to cast the content to the correct type.

      Specified by:
      type in interface Content
      Returns:
      The type of content.
    • video

      public Video video()
      Get the Video.
      Returns:
      the Video.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • from

      public 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

      public 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

      public 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

      public static VideoContent from(Video video)
      Create a new VideoContent from the given video.
      Parameters:
      video - the video.
      Returns:
      the new VideoContent.