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

DoneStreamChunk.md

106 lines1.8 KB

1---
2id: DoneStreamChunk
3title: DoneStreamChunk
4---
5​
6# Interface: DoneStreamChunk
7​
8Defined in: [types.ts:674](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L674)
9​
10## Extends
11​
12- [`BaseStreamChunk`](BaseStreamChunk.md)
13​
14## Properties
15​
16### finishReason
17​
18```ts
19finishReason: "length" | "stop" | "content_filter" | "tool_calls" | null;
20```
21​
22Defined in: [types.ts:676](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L676)
23​
24***
25​
26### id
27​
28```ts
29id: string;
30```
31​
32Defined in: [types.ts:643](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L643)
33​
34#### Inherited from
35​
36[`BaseStreamChunk`](BaseStreamChunk.md).[`id`](BaseStreamChunk.md#id)
37​
38***
39​
40### model
41​
42```ts
43model: string;
44```
45​
46Defined in: [types.ts:644](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L644)
47​
48#### Inherited from
49​
50[`BaseStreamChunk`](BaseStreamChunk.md).[`model`](BaseStreamChunk.md#model)
51​
52***
53​
54### timestamp
55​
56```ts
57timestamp: number;
58```
59​
60Defined in: [types.ts:645](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L645)
61​
62#### Inherited from
63​
64[`BaseStreamChunk`](BaseStreamChunk.md).[`timestamp`](BaseStreamChunk.md#timestamp)
65​
66***
67​
68### type
69​
70```ts
71type: "done";
72```
73​
74Defined in: [types.ts:675](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L675)
75​
76#### Overrides
77​
78[`BaseStreamChunk`](BaseStreamChunk.md).[`type`](BaseStreamChunk.md#type)
79​
80***
81​
82### usage?
83​
84```ts
85optional usage: object;
86```
87​
88Defined in: [types.ts:677](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L677)
89​
90#### completionTokens
91​
92```ts
93completionTokens: number;
94```
95​
96#### promptTokens
97​
98```ts
99promptTokens: number;
100```
101​
102#### totalTokens
103​
104```ts
105totalTokens: number;
106```