Docs
CodeRabbit
Cloudflare
Railway
WorkOS
Clerk
AG Grid
SerpAPI
OpenRouter
Netlify
Sentry
Electric
Prisma
Unkey
CodeRabbit
Cloudflare
Railway
WorkOS
Clerk
AG Grid
SerpAPI
OpenRouter
Netlify
Sentry
Electric
Prisma
Unkey
Class References
Function References
Interface References
Type Alias References
Variable References
Interface References

DocumentPart

Interface: DocumentPart<TMetadata>

Defined in: packages/ai/src/types.ts:262

Document content part for multimodal messages (e.g., PDFs).

Type Parameters

TMetadata

TMetadata = unknown

Provider-specific metadata type (e.g., Anthropic's media_type)

Properties

metadata?

ts
optional metadata: TMetadata;
optional metadata: TMetadata;

Defined in: packages/ai/src/types.ts:267

Provider-specific metadata (e.g., media_type for PDFs)


source

ts
source: ContentPartSource;
source: ContentPartSource;

Defined in: packages/ai/src/types.ts:265

Source of the document content


type

ts
type: "document";
type: "document";

Defined in: packages/ai/src/types.ts:263