You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: content/docs/07-reference/ai-sdk-ui/20-use-assistant.mdx
+6
Original file line number
Diff line number
Diff line change
@@ -107,6 +107,12 @@ This works in conjunction with [`AssistantResponse`](./assistant-response) in th
107
107
type: 'string | undefined',
108
108
description: 'The current thread ID.',
109
109
},
110
+
{
111
+
name: 'setThreadId',
112
+
type: '(threadId: string | undefined) => void',
113
+
description:
114
+
"Set the current thread ID. Specifying a thread ID will switch to that thread, if it exists. If set to 'undefined', a new thread will be created. For both cases, `threadId` will be updated with the new value and `messages` will be cleared.",
Copy file name to clipboardexpand all lines: packages/react/src/use-assistant.ts
+17-4
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,11 @@ export type UseAssistantHelpers = {
28
28
*/
29
29
threadId: string|undefined;
30
30
31
+
/**
32
+
* Set the current thread ID. Specifying a thread ID will switch to that thread, if it exists. If set to 'undefined', a new thread will be created. For both cases, `threadId` will be updated with the new value and `messages` will be cleared.
0 commit comments