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

ModelMessage.md

64 lines1.2 KB

1---
2id: ModelMessage
3title: ModelMessage
4---
5​
6# Interface: ModelMessage\<TContent\>
7​
8Defined in: [types.ts:223](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L223)
9​
10## Type Parameters
11​
12### TContent
13​
14`TContent` *extends* `string` \| `null` \| [`ContentPart`](../type-aliases/ContentPart.md)[] = `string` \| `null` \| [`ContentPart`](../type-aliases/ContentPart.md)[]
15​
16## Properties
17​
18### content
19​
20```ts
21content: TContent;
22```
23​
24Defined in: [types.ts:230](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L230)
25​
26***
27​
28### name?
29​
30```ts
31optional name: string;
32```
33​
34Defined in: [types.ts:231](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L231)
35​
36***
37​
38### role
39​
40```ts
41role: "user" | "assistant" | "tool";
42```
43​
44Defined in: [types.ts:229](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L229)
45​
46***
47​
48### toolCallId?
49​
50```ts
51optional toolCallId: string;
52```
53​
54Defined in: [types.ts:233](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L233)
55​
56***
57​
58### toolCalls?
59​
60```ts
61optional toolCalls: ToolCall[];
62```
63​
64Defined in: [types.ts:232](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L232)