Open History to see the last commit
1---
2id: TextCompletionChunk
3title: TextCompletionChunk
4---
5
6# Interface: TextCompletionChunk
7
8Defined in: [packages/typescript/ai/src/types.ts:1367](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1367)
9
10## Properties
11
12### content
13
14```ts
15content: string;
16```
17
18Defined in: [packages/typescript/ai/src/types.ts:1370](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1370)
19
20***
21
22### finishReason?
23
24```ts
25optional finishReason: "length" | "stop" | "content_filter" | null;
26```
27
28Defined in: [packages/typescript/ai/src/types.ts:1372](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1372)
29
30***
31
32### id
33
34```ts
35id: string;
36```
37
38Defined in: [packages/typescript/ai/src/types.ts:1368](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1368)
39
40***
41
42### model
43
44```ts
45model: string;
46```
47
48Defined in: [packages/typescript/ai/src/types.ts:1369](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1369)
49
50***
51
52### role?
53
54```ts
55optional role: "assistant";
56```
57
58Defined in: [packages/typescript/ai/src/types.ts:1371](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1371)
59
60***
61
62### usage?
63
64```ts
65optional usage: object;
66```
67
68Defined in: [packages/typescript/ai/src/types.ts:1373](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1373)
69
70#### completionTokens
71
72```ts
73completionTokens: number;
74```
75
76#### promptTokens
77
78```ts
79promptTokens: number;
80```
81
82#### totalTokens
83
84```ts
85totalTokens: number;
86```