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

splitMidConversationChanges.md

48 lines1007 Bytes

1---
2id: splitMidConversationChanges
3title: splitMidConversationChanges
4---
5​
6```ts
7function splitMidConversationChanges<TTool, TPrompt>(input):
8 | MidConversationRequest<TTool, TPrompt>
9 | undefined;
10```
11​
12Defined in: [packages/ai/src/utilities/mid-conversation.ts:129](https://github.com/TanStack/ai/blob/main/packages/ai/src/utilities/mid-conversation.ts#L129)
13​
14For adapters: resolve the names and counts of `changes` against the current
15`tools` and `systemPrompts`. Returns `undefined` when a name is missing, a
16name is used twice, or the counts do not add up. Then the adapter sends the
17request it sends today.
18​
19## Type Parameters
20​
21### TTool
22​
23`TTool` *extends* `object`
24​
25### TPrompt
26​
27`TPrompt`
28​
29## Parameters
30​
31### input
32​
33#### changes
34​
35[`MidConversationChanges`](../interfaces/MidConversationChanges.md)
36​
37#### systemPrompts
38​
39readonly `TPrompt`[]
40​
41#### tools
42​
43readonly `TTool`[]
44​
45## Returns
46​
47 \| [`MidConversationRequest`](../interfaces/MidConversationRequest.md)\<`TTool`, `TPrompt`\>
48 \| `undefined`