Open History to see the last commit
1---
2id: TextCompletionChunk
3title: TextCompletionChunk
4---
5
6# Interface: TextCompletionChunk
7
8Defined in: [types.ts:731](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L731)
9
10## Properties
11
12### content
13
14```ts
15content: string;
16```
17
18Defined in: [types.ts:734](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L734)
19
20***
21
22### finishReason?
23
24```ts
25optional finishReason: "length" | "stop" | "content_filter" | null;
26```
27
28Defined in: [types.ts:736](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L736)
29
30***
31
32### id
33
34```ts
35id: string;
36```
37
38Defined in: [types.ts:732](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L732)
39
40***
41
42### model
43
44```ts
45model: string;
46```
47
48Defined in: [types.ts:733](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L733)
49
50***
51
52### role?
53
54```ts
55optional role: "assistant";
56```
57
58Defined in: [types.ts:735](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L735)
59
60***
61
62### usage?
63
64```ts
65optional usage: object;
66```
67
68Defined in: [types.ts:737](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L737)
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```