Open History to see the last commit
1---
2id: defineInterrupt
3title: defineInterrupt
4---
5
6## Call Signature
7
8```ts
9function defineInterrupt<TId, TPayloadSchema, TResponseSchema>(options): DefinedInterruptDefinition<TId, TPayloadSchema, TResponseSchema, InferSchemaOutput<TPayloadSchema>, InferSchemaInput<TPayloadSchema>>;
10```
11
12Defined in: packages/ai/src/interrupt-definition.ts:418
13
14### Type Parameters
15
16#### TId
17
18`TId` *extends* `string`
19
20#### TPayloadSchema
21
22`TPayloadSchema` *extends* `PortableSchema`
23
24#### TResponseSchema
25
26`TResponseSchema` *extends* `PortableSchema`
27
28### Parameters
29
30#### options
31
32##### id
33
34`TId`
35
36##### payloadSchema
37
38`TPayloadSchema`
39
40##### responseSchema
41
42`TResponseSchema`
43
44### Returns
45
46`DefinedInterruptDefinition`\<`TId`, `TPayloadSchema`, `TResponseSchema`, `InferSchemaOutput`\<`TPayloadSchema`\>, `InferSchemaInput`\<`TPayloadSchema`\>\>
47
48## Call Signature
49
50```ts
51function defineInterrupt<TId, TPayloadSchema>(options): DefinedInterruptDefinition<TId, TPayloadSchema, undefined, InferSchemaOutput<TPayloadSchema>, InferSchemaInput<TPayloadSchema>>;
52```
53
54Defined in: packages/ai/src/interrupt-definition.ts:433
55
56### Type Parameters
57
58#### TId
59
60`TId` *extends* `string`
61
62#### TPayloadSchema
63
64`TPayloadSchema` *extends* `PortableSchema`
65
66### Parameters
67
68#### options
69
70##### id
71
72`TId`
73
74##### payloadSchema
75
76`TPayloadSchema`
77
78##### responseSchema?
79
80`undefined`
81
82### Returns
83
84`DefinedInterruptDefinition`\<`TId`, `TPayloadSchema`, `undefined`, `InferSchemaOutput`\<`TPayloadSchema`\>, `InferSchemaInput`\<`TPayloadSchema`\>\>
85
86## Call Signature
87
88```ts
89function defineInterrupt<TId, TResponseSchema>(options): DefinedInterruptDefinition<TId, undefined, TResponseSchema, undefined, undefined>;
90```
91
92Defined in: packages/ai/src/interrupt-definition.ts:447
93
94### Type Parameters
95
96#### TId
97
98`TId` *extends* `string`
99
100#### TResponseSchema
101
102`TResponseSchema` *extends* `PortableSchema`
103
104### Parameters
105
106#### options
107
108##### id
109
110`TId`
111
112##### payloadSchema?
113
114`undefined`
115
116##### responseSchema
117
118`TResponseSchema`
119
120### Returns
121
122`DefinedInterruptDefinition`\<`TId`, `undefined`, `TResponseSchema`, `undefined`, `undefined`\>