Open History to see the last commit
1---
2id: CapabilityGetter
3title: CapabilityGetter
4---
5
6Defined in: packages/ai/src/activities/chat/middleware/capabilities.ts:17
7
8Reads a capability value off a context. Overloaded so the flag narrows the return.
9
10## Type Parameters
11
12### TValue
13
14`TValue`
15
16## Call Signature
17
18```ts
19CapabilityGetter(ctx): TValue;
20```
21
22Defined in: packages/ai/src/activities/chat/middleware/capabilities.ts:18
23
24Reads a capability value off a context. Overloaded so the flag narrows the return.
25
26### Parameters
27
28#### ctx
29
30[`CapabilityContext`](CapabilityContext.md)
31
32### Returns
33
34`TValue`
35
36## Call Signature
37
38```ts
39CapabilityGetter(ctx, opts): TValue | undefined;
40```
41
42Defined in: packages/ai/src/activities/chat/middleware/capabilities.ts:19
43
44Reads a capability value off a context. Overloaded so the flag narrows the return.
45
46### Parameters
47
48#### ctx
49
50[`CapabilityContext`](CapabilityContext.md)
51
52#### opts
53
54##### optional
55
56`true`
57
58### Returns
59
60`TValue` \| `undefined`