Class PdfFileContent
java.lang.Object
dev.langchain4j.data.message.PdfFileContent
- All Implemented Interfaces:
Content
-
Constructor Summary
ConstructorsConstructorDescriptionPdfFileContent(PdfFile pdfFile) Create a newPdfFileContentfrom the given PDF file.PdfFileContent(String url) Create a newPdfFileContentfrom the given url.PdfFileContent(String base64Data, String mimeType) Create a newPdfFileContentfrom the given base64 data and mime type.PdfFileContent(URI url) Create a newPdfFileContentfrom the given url. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic PdfFileContentCreate a newPdfFileContentfrom the given PDF.static PdfFileContentCreate a newPdfFileContentfrom the given url.static PdfFileContentCreate a newPdfFileContentfrom the given base64 data and mime type.static PdfFileContentCreate a newPdfFileContentfrom the given url.inthashCode()pdfFile()Get thePdfFile.toString()type()Returns the type of content.
-
Constructor Details
-
PdfFileContent
Create a newPdfFileContentfrom the given url.- Parameters:
url- the url of the PDF.
-
PdfFileContent
Create a newPdfFileContentfrom the given url.- Parameters:
url- the url of the PDF.
-
PdfFileContent
Create a newPdfFileContentfrom the given base64 data and mime type.- Parameters:
base64Data- the base64 data of the PDF.mimeType- the mime type of the PDF.
-
PdfFileContent
Create a newPdfFileContentfrom the given PDF file.- Parameters:
pdfFile- the PDF.
-
-
Method Details
-
type
Description copied from interface:ContentReturns the type of content.Can be used to cast the content to the correct type.
-
pdfFile
-
equals
-
hashCode
-
toString
-
from
Create a newPdfFileContentfrom the given url.- Parameters:
url- the url of the PDF.- Returns:
- the new
PdfFileContent.
-
from
Create a newPdfFileContentfrom the given url.- Parameters:
url- the url of the PDF.- Returns:
- the new
PdfFileContent.
-
from
Create a newPdfFileContentfrom the given base64 data and mime type.- Parameters:
base64Data- the base64 data of the PDF.mimeType- the mime type of the PDF.- Returns:
- the new
PdfFileContent.
-
from
Create a newPdfFileContentfrom the given PDF.- Parameters:
pdfFile- the PDF.- Returns:
- the new
PdfFileContent.
-