Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

isContentPart.md

26 lines545 Bytes

Function: isContentPart()

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