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

isContentPart

Function: isContentPart()

ts
function isContentPart(value): value is ContentPart;
function isContentPart(value): value is ContentPart;

Defined in: packages/ai/src/utilities/tool-result.ts:16

Structural check for a single ContentPart. A text part must carry a string content; every other modality must carry a source with type of 'url' | 'data' and a string value.

Parameters

value

unknown

Returns

value is ContentPart