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

ModelMessage.md

86 lines1.7 KB

1---
2id: ModelMessage
3title: ModelMessage
4---
5​
6# Interface: ModelMessage\<TContent\>
7​
8Defined in: [packages/typescript/ai/src/types.ts:312](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L312)
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: [packages/typescript/ai/src/types.ts:319](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L319)
25​
26***
27​
28### name?
29​
30```ts
31optional name: string;
32```
33​
34Defined in: [packages/typescript/ai/src/types.ts:320](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L320)
35​
36***
37​
38### role
39​
40```ts
41role: "user" | "assistant" | "tool";
42```
43​
44Defined in: [packages/typescript/ai/src/types.ts:318](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L318)
45​
46***
47​
48### thinking?
49​
50```ts
51optional thinking: object[];
52```
53​
54Defined in: [packages/typescript/ai/src/types.ts:323](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L323)
55​
56#### content
57​
58```ts
59content: string;
60```
61​
62#### signature?
63​
64```ts
65optional signature: string;
66```
67​
68***
69​
70### toolCallId?
71​
72```ts
73optional toolCallId: string;
74```
75​
76Defined in: [packages/typescript/ai/src/types.ts:322](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L322)
77​
78***
79​
80### toolCalls?
81​
82```ts
83optional toolCalls: ToolCall<unknown>[];
84```
85​
86Defined in: [packages/typescript/ai/src/types.ts:321](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L321)