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

isContentPart.md

25 lines482 Bytes

1---
2id: isContentPart
3title: isContentPart
4---
5​
6```ts
7function isContentPart(value): value is ContentPart;
8```
9​
10Defined in: packages/ai/src/utilities/tool-result.ts:23
11​
12Structural check for a single `ContentPart`. A text part must carry a string
13`content`. Every other part carries a source with a string `value`; a file
14source's `value` is a non-empty opaque handle, and its optional `provider`
15is a string.
16​
17## Parameters
18​
19### value
20​
21`unknown`
22​
23## Returns
24​
25`value is ContentPart`