@themaximalist/llm.js
Preparing search index...
Attachment
Class Attachment
Index
Constructors
constructor
Properties
content
Type
data
type
Accessors
content
is
Document
is
Image
is
URL
source
Methods
from
Base64
from
Document
URL
from
GIF
from
Image
URL
from
JPEG
from
PDF
from
PNG
from
SVG
from
TIFF
from
WEBP
Constructors
constructor
new
Attachment
(
data
:
string
,
type
:
AttachmentType
,
contentType
:
string
,
)
:
Attachment
Parameters
data
:
string
type
:
AttachmentType
contentType
:
string
Returns
Attachment
Properties
content
Type
contentType
:
string
data
data
:
string
type
type
:
AttachmentType
Accessors
content
get
content
()
:
{
source
:
|
{
data
?:
undefined
;
media_type
?:
undefined
;
type
:
string
;
url
:
string
;
}
|
{
data
:
string
;
media_type
:
string
;
type
:
string
;
url
?:
undefined
}
;
type
:
AttachmentType
;
}
Returns
{
source
:
|
{
data
?:
undefined
;
media_type
?:
undefined
;
type
:
string
;
url
:
string
;
}
|
{
data
:
string
;
media_type
:
string
;
type
:
string
;
url
?:
undefined
}
;
type
:
AttachmentType
;
}
is
Document
get
isDocument
()
:
boolean
Returns
boolean
is
Image
get
isImage
()
:
boolean
Returns
boolean
is
URL
get
isURL
()
:
boolean
Returns
boolean
source
get
source
()
:
|
{
data
?:
undefined
;
media_type
?:
undefined
;
type
:
string
;
url
:
string
;
}
|
{
data
:
string
;
media_type
:
string
;
type
:
string
;
url
?:
undefined
}
Returns
|
{
data
?:
undefined
;
media_type
?:
undefined
;
type
:
string
;
url
:
string
;
}
|
{
data
:
string
;
media_type
:
string
;
type
:
string
;
url
?:
undefined
}
Methods
Static
from
Base64
fromBase64
(
data
:
string
,
type
:
AttachmentType
,
contentType
:
string
)
:
Attachment
Parameters
data
:
string
type
:
AttachmentType
contentType
:
string
Returns
Attachment
Static
from
Document
URL
fromDocumentURL
(
url
:
string
)
:
Attachment
Parameters
url
:
string
Returns
Attachment
Static
from
GIF
fromGIF
(
data
:
string
)
:
Attachment
Parameters
data
:
string
Returns
Attachment
Static
from
Image
URL
fromImageURL
(
url
:
string
)
:
Attachment
Parameters
url
:
string
Returns
Attachment
Static
from
JPEG
fromJPEG
(
data
:
string
)
:
Attachment
Parameters
data
:
string
Returns
Attachment
Static
from
PDF
fromPDF
(
data
:
string
)
:
Attachment
Parameters
data
:
string
Returns
Attachment
Static
from
PNG
fromPNG
(
data
:
string
)
:
Attachment
Parameters
data
:
string
Returns
Attachment
Static
from
SVG
fromSVG
(
data
:
string
)
:
Attachment
Parameters
data
:
string
Returns
Attachment
Static
from
TIFF
fromTIFF
(
data
:
string
)
:
Attachment
Parameters
data
:
string
Returns
Attachment
Static
from
WEBP
fromWEBP
(
data
:
string
)
:
Attachment
Parameters
data
:
string
Returns
Attachment
Settings
Member Visibility
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
content
Type
data
type
Accessors
content
is
Document
is
Image
is
URL
source
Methods
from
Base64
from
Document
URL
from
GIF
from
Image
URL
from
JPEG
from
PDF
from
PNG
from
SVG
from
TIFF
from
WEBP
@themaximalist/llm.js
Loading...