@isdk/ai-tool 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/README.cn.md +261 -0
  2. package/README.md +3 -0
  3. package/dist/chunk-EZFPVSGF.mjs +22 -0
  4. package/dist/chunk-PKECBABP.mjs +5085 -0
  5. package/dist/funcs.d.mts +6 -0
  6. package/dist/funcs.d.ts +6 -0
  7. package/dist/funcs.js +5016 -0
  8. package/dist/funcs.mjs +37 -0
  9. package/dist/index-D4KjfAKl.d.mts +606 -0
  10. package/dist/index-D4KjfAKl.d.ts +606 -0
  11. package/dist/index.d.mts +1097 -0
  12. package/dist/index.d.ts +1097 -0
  13. package/dist/index.js +5239 -0
  14. package/dist/index.mjs +399 -0
  15. package/dist/test/util.d.mts +7 -0
  16. package/dist/test/util.d.ts +7 -0
  17. package/dist/test/util.js +98 -0
  18. package/dist/test/util.mjs +61 -0
  19. package/docs/.nojekyll +1 -0
  20. package/docs/README.md +5 -0
  21. package/docs/classes/AbortError.md +359 -0
  22. package/docs/classes/AlreadyExistsError.md +339 -0
  23. package/docs/classes/BaseError.md +346 -0
  24. package/docs/classes/ClientTools.md +2705 -0
  25. package/docs/classes/CommonError.md +368 -0
  26. package/docs/classes/ConfigFile.md +346 -0
  27. package/docs/classes/EventClient.md +3183 -0
  28. package/docs/classes/EventServer.md +3138 -0
  29. package/docs/classes/EventToolFunc.md +2498 -0
  30. package/docs/classes/FStringPromptTemplate.md +1236 -0
  31. package/docs/classes/FewShotPromptTemplate.md +1286 -0
  32. package/docs/classes/GolangPromptTemplate.md +1236 -0
  33. package/docs/classes/HFEnvironment.md +212 -0
  34. package/docs/classes/HFInterpreter.md +386 -0
  35. package/docs/classes/HFTemplate.md +79 -0
  36. package/docs/classes/HfPromptTemplate.md +1236 -0
  37. package/docs/classes/NotFoundError.md +339 -0
  38. package/docs/classes/NotImplementationError.md +339 -0
  39. package/docs/classes/PromptExampleSelector.md +207 -0
  40. package/docs/classes/PromptTemplate.md +1163 -0
  41. package/docs/classes/ReadableStreamError.md +359 -0
  42. package/docs/classes/ResClientTools.md +2859 -0
  43. package/docs/classes/ResServerTools.md +2783 -0
  44. package/docs/classes/SSEChannel.md +289 -0
  45. package/docs/classes/ServerTools.md +2633 -0
  46. package/docs/classes/ToolFunc.md +2124 -0
  47. package/docs/enums/ErrorCode.md +217 -0
  48. package/docs/enums/XXHashAlgorithm.md +30 -0
  49. package/docs/interfaces/AIChatAssistantMessageParam.md +84 -0
  50. package/docs/interfaces/AIChatContentPartImage.md +36 -0
  51. package/docs/interfaces/AIChatContentPartText.md +30 -0
  52. package/docs/interfaces/AIChatMessageParamBase.md +35 -0
  53. package/docs/interfaces/AIChatMessageToolCall.md +48 -0
  54. package/docs/interfaces/AIChatSystemMessageParam.md +51 -0
  55. package/docs/interfaces/AIChatToolMessageParam.md +62 -0
  56. package/docs/interfaces/AIChatUserMessageParam.md +95 -0
  57. package/docs/interfaces/AIResult.md +65 -0
  58. package/docs/interfaces/AIStreamCallbacksAndOptions.md +158 -0
  59. package/docs/interfaces/AIStreamParser.md +33 -0
  60. package/docs/interfaces/AIStreamParserOptions.md +23 -0
  61. package/docs/interfaces/BaseFunc.md +145 -0
  62. package/docs/interfaces/BaseFuncItem.md +99 -0
  63. package/docs/interfaces/ClientFuncItem.md +181 -0
  64. package/docs/interfaces/DotenvExpandOptions.md +51 -0
  65. package/docs/interfaces/DotenvExpandOutput.md +30 -0
  66. package/docs/interfaces/DotenvParseInput.md +7 -0
  67. package/docs/interfaces/DotenvParseOutput.md +7 -0
  68. package/docs/interfaces/DotenvPopulateInput.md +7 -0
  69. package/docs/interfaces/EventClientFuncParams.md +66 -0
  70. package/docs/interfaces/EventServerFuncParams.md +79 -0
  71. package/docs/interfaces/FewShotPromptTemplateOptions.md +179 -0
  72. package/docs/interfaces/FuncItem.md +130 -0
  73. package/docs/interfaces/FuncParam.md +67 -0
  74. package/docs/interfaces/FuncParams.md +7 -0
  75. package/docs/interfaces/Funcs.md +7 -0
  76. package/docs/interfaces/IOptions.md +30 -0
  77. package/docs/interfaces/JsonFilter.md +7 -0
  78. package/docs/interfaces/PromptExampleSelectorOptions.md +39 -0
  79. package/docs/interfaces/PromptTemplateOptions.md +84 -0
  80. package/docs/interfaces/RemoteFuncItem.md +167 -0
  81. package/docs/interfaces/ResClientFuncParams.md +34 -0
  82. package/docs/interfaces/ResServerFuncParams.md +79 -0
  83. package/docs/interfaces/SanitizeFilenameOptions.md +30 -0
  84. package/docs/interfaces/ServerFuncItem.md +192 -0
  85. package/docs/interfaces/ServerFuncParams.md +44 -0
  86. package/docs/modules.md +2707 -0
  87. package/package.json +112 -0
@@ -0,0 +1,65 @@
1
+ [@isdk/ai-tool](../README.md) / [Exports](../modules.md) / AIResult
2
+
3
+ # Interface: AIResult\<TValue, TOptions\>
4
+
5
+ ## Type parameters
6
+
7
+ | Name | Type |
8
+ | :------ | :------ |
9
+ | `TValue` | `any` |
10
+ | `TOptions` | `any` |
11
+
12
+ ## Table of contents
13
+
14
+ ### Properties
15
+
16
+ - [content](AIResult.md#content)
17
+ - [finishReason](AIResult.md#finishreason)
18
+ - [options](AIResult.md#options)
19
+ - [stop](AIResult.md#stop)
20
+
21
+ ## Properties
22
+
23
+ ### content
24
+
25
+ • `Optional` **content**: `TValue`
26
+
27
+ The generated value.
28
+
29
+ #### Defined in
30
+
31
+ [packages/ai-tool/src/utils/chat.ts:16](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/chat.ts#L16)
32
+
33
+ ___
34
+
35
+ ### finishReason
36
+
37
+ • `Optional` **finishReason**: ``null`` \| ``"length"`` \| ``"stop"`` \| ``"content-filter"`` \| ``"tool-calls"`` \| ``"abort"`` \| ``"error"`` \| ``"other"``
38
+
39
+ The reason why the generation stopped.
40
+
41
+ #### Defined in
42
+
43
+ [packages/ai-tool/src/utils/chat.ts:21](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/chat.ts#L21)
44
+
45
+ ___
46
+
47
+ ### options
48
+
49
+ • `Optional` **options**: `TOptions`
50
+
51
+ #### Defined in
52
+
53
+ [packages/ai-tool/src/utils/chat.ts:22](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/chat.ts#L22)
54
+
55
+ ___
56
+
57
+ ### stop
58
+
59
+ • `Optional` **stop**: `boolean`
60
+
61
+ for stream mode
62
+
63
+ #### Defined in
64
+
65
+ [packages/ai-tool/src/utils/chat.ts:26](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/chat.ts#L26)
@@ -0,0 +1,158 @@
1
+ [@isdk/ai-tool](../README.md) / [Exports](../modules.md) / AIStreamCallbacksAndOptions
2
+
3
+ # Interface: AIStreamCallbacksAndOptions
4
+
5
+ Configuration options and helper callback methods for AIStream stream lifecycle events.
6
+
7
+ ## Table of contents
8
+
9
+ ### Properties
10
+
11
+ - [experimental\_streamData](AIStreamCallbacksAndOptions.md#experimental_streamdata)
12
+ - [onCompletion](AIStreamCallbacksAndOptions.md#oncompletion)
13
+ - [onFinal](AIStreamCallbacksAndOptions.md#onfinal)
14
+ - [onStart](AIStreamCallbacksAndOptions.md#onstart)
15
+ - [onText](AIStreamCallbacksAndOptions.md#ontext)
16
+ - [onToken](AIStreamCallbacksAndOptions.md#ontoken)
17
+
18
+ ## Properties
19
+
20
+ ### experimental\_streamData
21
+
22
+ • `Optional` **experimental\_streamData**: `boolean`
23
+
24
+ A flag for enabling the experimental_StreamData class and the new protocol.
25
+
26
+ **`See`**
27
+
28
+ https://github.com/vercel-labs/ai/pull/425
29
+
30
+ When StreamData is rolled out, this will be removed and the new protocol will be used by default.
31
+
32
+ #### Defined in
33
+
34
+ [packages/ai-tool/src/utils/stream/ai-stream.ts:31](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/stream/ai-stream.ts#L31)
35
+
36
+ ___
37
+
38
+ ### onCompletion
39
+
40
+ • `Optional` **onCompletion**: (`completion`: `string`) => `void` \| `Promise`\<`void`\>
41
+
42
+ `onCompletion`: Called for each tokenized message.
43
+
44
+ #### Type declaration
45
+
46
+ ▸ (`completion`): `void` \| `Promise`\<`void`\>
47
+
48
+ ##### Parameters
49
+
50
+ | Name | Type |
51
+ | :------ | :------ |
52
+ | `completion` | `string` |
53
+
54
+ ##### Returns
55
+
56
+ `void` \| `Promise`\<`void`\>
57
+
58
+ #### Defined in
59
+
60
+ [packages/ai-tool/src/utils/stream/ai-stream.ts:18](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/stream/ai-stream.ts#L18)
61
+
62
+ ___
63
+
64
+ ### onFinal
65
+
66
+ • `Optional` **onFinal**: (`completion`: `string`) => `void` \| `Promise`\<`void`\>
67
+
68
+ `onFinal`: Called once when the stream is closed with the final completion message.
69
+
70
+ #### Type declaration
71
+
72
+ ▸ (`completion`): `void` \| `Promise`\<`void`\>
73
+
74
+ ##### Parameters
75
+
76
+ | Name | Type |
77
+ | :------ | :------ |
78
+ | `completion` | `string` |
79
+
80
+ ##### Returns
81
+
82
+ `void` \| `Promise`\<`void`\>
83
+
84
+ #### Defined in
85
+
86
+ [packages/ai-tool/src/utils/stream/ai-stream.ts:20](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/stream/ai-stream.ts#L20)
87
+
88
+ ___
89
+
90
+ ### onStart
91
+
92
+ • `Optional` **onStart**: () => `void` \| `Promise`\<`void`\>
93
+
94
+ `onStart`: Called once when the stream is initialized.
95
+
96
+ #### Type declaration
97
+
98
+ ▸ (): `void` \| `Promise`\<`void`\>
99
+
100
+ ##### Returns
101
+
102
+ `void` \| `Promise`\<`void`\>
103
+
104
+ #### Defined in
105
+
106
+ [packages/ai-tool/src/utils/stream/ai-stream.ts:16](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/stream/ai-stream.ts#L16)
107
+
108
+ ___
109
+
110
+ ### onText
111
+
112
+ • `Optional` **onText**: (`text`: `string`) => `void` \| `Promise`\<`void`\>
113
+
114
+ `onText`: Called for each text chunk.
115
+
116
+ #### Type declaration
117
+
118
+ ▸ (`text`): `void` \| `Promise`\<`void`\>
119
+
120
+ ##### Parameters
121
+
122
+ | Name | Type |
123
+ | :------ | :------ |
124
+ | `text` | `string` |
125
+
126
+ ##### Returns
127
+
128
+ `void` \| `Promise`\<`void`\>
129
+
130
+ #### Defined in
131
+
132
+ [packages/ai-tool/src/utils/stream/ai-stream.ts:24](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/stream/ai-stream.ts#L24)
133
+
134
+ ___
135
+
136
+ ### onToken
137
+
138
+ • `Optional` **onToken**: (`token`: `string`) => `void` \| `Promise`\<`void`\>
139
+
140
+ `onToken`: Called for each tokenized message.
141
+
142
+ #### Type declaration
143
+
144
+ ▸ (`token`): `void` \| `Promise`\<`void`\>
145
+
146
+ ##### Parameters
147
+
148
+ | Name | Type |
149
+ | :------ | :------ |
150
+ | `token` | `string` |
151
+
152
+ ##### Returns
153
+
154
+ `void` \| `Promise`\<`void`\>
155
+
156
+ #### Defined in
157
+
158
+ [packages/ai-tool/src/utils/stream/ai-stream.ts:22](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/stream/ai-stream.ts#L22)
@@ -0,0 +1,33 @@
1
+ [@isdk/ai-tool](../README.md) / [Exports](../modules.md) / AIStreamParser
2
+
3
+ # Interface: AIStreamParser\<T, TOptions\>
4
+
5
+ Custom parser for AIStream data.
6
+
7
+ ## Type parameters
8
+
9
+ | Name | Type |
10
+ | :------ | :------ |
11
+ | `T` | `any` |
12
+ | `TOptions` | `any` |
13
+
14
+ ## Callable
15
+
16
+ ### AIStreamParser
17
+
18
+ ▸ **AIStreamParser**(`data`, `options`): `void` \| [`AIResult`](AIResult.md)\<`T`, `TOptions`\>
19
+
20
+ #### Parameters
21
+
22
+ | Name | Type |
23
+ | :------ | :------ |
24
+ | `data` | `string` |
25
+ | `options` | [`AIStreamParserOptions`](AIStreamParserOptions.md) |
26
+
27
+ #### Returns
28
+
29
+ `void` \| [`AIResult`](AIResult.md)\<`T`, `TOptions`\>
30
+
31
+ #### Defined in
32
+
33
+ [packages/ai-tool/src/utils/stream/ai-stream.ts:51](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/stream/ai-stream.ts#L51)
@@ -0,0 +1,23 @@
1
+ [@isdk/ai-tool](../README.md) / [Exports](../modules.md) / AIStreamParserOptions
2
+
3
+ # Interface: AIStreamParserOptions
4
+
5
+ Options for the AIStreamParser.
6
+
7
+ ## Table of contents
8
+
9
+ ### Properties
10
+
11
+ - [event](AIStreamParserOptions.md#event)
12
+
13
+ ## Properties
14
+
15
+ ### event
16
+
17
+ • `Optional` **event**: `string`
18
+
19
+ The event (type) from the server side event stream.
20
+
21
+ #### Defined in
22
+
23
+ [packages/ai-tool/src/utils/stream/ai-stream.ts:40](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/stream/ai-stream.ts#L40)
@@ -0,0 +1,145 @@
1
+ [@isdk/ai-tool](../README.md) / [Exports](../modules.md) / BaseFunc
2
+
3
+ # Interface: BaseFunc
4
+
5
+ ## Hierarchy
6
+
7
+ - [`BaseFuncItem`](BaseFuncItem.md)
8
+
9
+ ↳ **`BaseFunc`**
10
+
11
+ ↳↳ [`ToolFunc`](../classes/ToolFunc.md)
12
+
13
+ ## Table of contents
14
+
15
+ ### Properties
16
+
17
+ - [name](BaseFunc.md#name)
18
+ - [params](BaseFunc.md#params)
19
+ - [result](BaseFunc.md#result)
20
+ - [scope](BaseFunc.md#scope)
21
+ - [setup](BaseFunc.md#setup)
22
+ - [tags](BaseFunc.md#tags)
23
+
24
+ ### Methods
25
+
26
+ - [func](BaseFunc.md#func)
27
+
28
+ ## Properties
29
+
30
+ ### name
31
+
32
+ • `Optional` **name**: `string`
33
+
34
+ #### Inherited from
35
+
36
+ [BaseFuncItem](BaseFuncItem.md).[name](BaseFuncItem.md#name)
37
+
38
+ #### Defined in
39
+
40
+ [packages/ai-tool/src/tool-func.ts:21](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L21)
41
+
42
+ ___
43
+
44
+ ### params
45
+
46
+ • `Optional` **params**: [`FuncParams`](FuncParams.md) \| [`FuncParam`](FuncParam.md)[]
47
+
48
+ #### Inherited from
49
+
50
+ [BaseFuncItem](BaseFuncItem.md).[params](BaseFuncItem.md#params)
51
+
52
+ #### Defined in
53
+
54
+ [packages/ai-tool/src/tool-func.ts:22](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L22)
55
+
56
+ ___
57
+
58
+ ### result
59
+
60
+ • `Optional` **result**: `string`
61
+
62
+ #### Inherited from
63
+
64
+ [BaseFuncItem](BaseFuncItem.md).[result](BaseFuncItem.md#result)
65
+
66
+ #### Defined in
67
+
68
+ [packages/ai-tool/src/tool-func.ts:23](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L23)
69
+
70
+ ___
71
+
72
+ ### scope
73
+
74
+ • `Optional` **scope**: `any`
75
+
76
+ #### Inherited from
77
+
78
+ [BaseFuncItem](BaseFuncItem.md).[scope](BaseFuncItem.md#scope)
79
+
80
+ #### Defined in
81
+
82
+ [packages/ai-tool/src/tool-func.ts:24](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L24)
83
+
84
+ ___
85
+
86
+ ### setup
87
+
88
+ • `Optional` **setup**: (`this`: [`ToolFunc`](../classes/ToolFunc.md), `options?`: [`FuncItem`](FuncItem.md)) => `void`
89
+
90
+ #### Type declaration
91
+
92
+ ▸ (`this`, `options?`): `void`
93
+
94
+ ##### Parameters
95
+
96
+ | Name | Type |
97
+ | :------ | :------ |
98
+ | `this` | [`ToolFunc`](../classes/ToolFunc.md) |
99
+ | `options?` | [`FuncItem`](FuncItem.md) |
100
+
101
+ ##### Returns
102
+
103
+ `void`
104
+
105
+ #### Inherited from
106
+
107
+ [BaseFuncItem](BaseFuncItem.md).[setup](BaseFuncItem.md#setup)
108
+
109
+ #### Defined in
110
+
111
+ [packages/ai-tool/src/tool-func.ts:26](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L26)
112
+
113
+ ___
114
+
115
+ ### tags
116
+
117
+ • `Optional` **tags**: `string` \| `string`[]
118
+
119
+ #### Inherited from
120
+
121
+ [BaseFuncItem](BaseFuncItem.md).[tags](BaseFuncItem.md#tags)
122
+
123
+ #### Defined in
124
+
125
+ [packages/ai-tool/src/tool-func.ts:25](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L25)
126
+
127
+ ## Methods
128
+
129
+ ### func
130
+
131
+ ▸ **func**(`...params`): `any`
132
+
133
+ #### Parameters
134
+
135
+ | Name | Type |
136
+ | :------ | :------ |
137
+ | `...params` | `any` |
138
+
139
+ #### Returns
140
+
141
+ `any`
142
+
143
+ #### Defined in
144
+
145
+ [packages/ai-tool/src/tool-func.ts:34](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L34)
@@ -0,0 +1,99 @@
1
+ [@isdk/ai-tool](../README.md) / [Exports](../modules.md) / BaseFuncItem
2
+
3
+ # Interface: BaseFuncItem
4
+
5
+ ## Hierarchy
6
+
7
+ - **`BaseFuncItem`**
8
+
9
+ ↳ [`RemoteFuncItem`](RemoteFuncItem.md)
10
+
11
+ ↳ [`FuncItem`](FuncItem.md)
12
+
13
+ ↳ [`BaseFunc`](BaseFunc.md)
14
+
15
+ ## Table of contents
16
+
17
+ ### Properties
18
+
19
+ - [name](BaseFuncItem.md#name)
20
+ - [params](BaseFuncItem.md#params)
21
+ - [result](BaseFuncItem.md#result)
22
+ - [scope](BaseFuncItem.md#scope)
23
+ - [setup](BaseFuncItem.md#setup)
24
+ - [tags](BaseFuncItem.md#tags)
25
+
26
+ ## Properties
27
+
28
+ ### name
29
+
30
+ • `Optional` **name**: `string`
31
+
32
+ #### Defined in
33
+
34
+ [packages/ai-tool/src/tool-func.ts:21](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L21)
35
+
36
+ ___
37
+
38
+ ### params
39
+
40
+ • `Optional` **params**: [`FuncParams`](FuncParams.md) \| [`FuncParam`](FuncParam.md)[]
41
+
42
+ #### Defined in
43
+
44
+ [packages/ai-tool/src/tool-func.ts:22](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L22)
45
+
46
+ ___
47
+
48
+ ### result
49
+
50
+ • `Optional` **result**: `string`
51
+
52
+ #### Defined in
53
+
54
+ [packages/ai-tool/src/tool-func.ts:23](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L23)
55
+
56
+ ___
57
+
58
+ ### scope
59
+
60
+ • `Optional` **scope**: `any`
61
+
62
+ #### Defined in
63
+
64
+ [packages/ai-tool/src/tool-func.ts:24](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L24)
65
+
66
+ ___
67
+
68
+ ### setup
69
+
70
+ • `Optional` **setup**: (`this`: [`ToolFunc`](../classes/ToolFunc.md), `options?`: [`FuncItem`](FuncItem.md)) => `void`
71
+
72
+ #### Type declaration
73
+
74
+ ▸ (`this`, `options?`): `void`
75
+
76
+ ##### Parameters
77
+
78
+ | Name | Type |
79
+ | :------ | :------ |
80
+ | `this` | [`ToolFunc`](../classes/ToolFunc.md) |
81
+ | `options?` | [`FuncItem`](FuncItem.md) |
82
+
83
+ ##### Returns
84
+
85
+ `void`
86
+
87
+ #### Defined in
88
+
89
+ [packages/ai-tool/src/tool-func.ts:26](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L26)
90
+
91
+ ___
92
+
93
+ ### tags
94
+
95
+ • `Optional` **tags**: `string` \| `string`[]
96
+
97
+ #### Defined in
98
+
99
+ [packages/ai-tool/src/tool-func.ts:25](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L25)
@@ -0,0 +1,181 @@
1
+ [@isdk/ai-tool](../README.md) / [Exports](../modules.md) / ClientFuncItem
2
+
3
+ # Interface: ClientFuncItem
4
+
5
+ ## Hierarchy
6
+
7
+ - [`RemoteFuncItem`](RemoteFuncItem.md)
8
+
9
+ ↳ **`ClientFuncItem`**
10
+
11
+ ↳↳ [`ClientTools`](../classes/ClientTools.md)
12
+
13
+ ## Table of contents
14
+
15
+ ### Properties
16
+
17
+ - [action](ClientFuncItem.md#action)
18
+ - [apiRoot](ClientFuncItem.md#apiroot)
19
+ - [fetchOptions](ClientFuncItem.md#fetchoptions)
20
+ - [name](ClientFuncItem.md#name)
21
+ - [params](ClientFuncItem.md#params)
22
+ - [result](ClientFuncItem.md#result)
23
+ - [scope](ClientFuncItem.md#scope)
24
+ - [setup](ClientFuncItem.md#setup)
25
+ - [stream](ClientFuncItem.md#stream)
26
+ - [tags](ClientFuncItem.md#tags)
27
+
28
+ ## Properties
29
+
30
+ ### action
31
+
32
+ • `Optional` **action**: ``"get"`` \| ``"post"`` \| ``"put"`` \| ``"delete"`` \| ``"patch"`` \| ``"list"`` \| ``"res"``
33
+
34
+ #### Inherited from
35
+
36
+ [RemoteFuncItem](RemoteFuncItem.md).[action](RemoteFuncItem.md#action)
37
+
38
+ #### Defined in
39
+
40
+ [packages/ai-tool/src/utils/consts.ts:36](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/consts.ts#L36)
41
+
42
+ ___
43
+
44
+ ### apiRoot
45
+
46
+ • `Optional` **apiRoot**: `string`
47
+
48
+ #### Inherited from
49
+
50
+ [RemoteFuncItem](RemoteFuncItem.md).[apiRoot](RemoteFuncItem.md#apiroot)
51
+
52
+ #### Defined in
53
+
54
+ [packages/ai-tool/src/utils/consts.ts:35](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/consts.ts#L35)
55
+
56
+ ___
57
+
58
+ ### fetchOptions
59
+
60
+ • `Optional` **fetchOptions**: `any`
61
+
62
+ #### Inherited from
63
+
64
+ [RemoteFuncItem](RemoteFuncItem.md).[fetchOptions](RemoteFuncItem.md#fetchoptions)
65
+
66
+ #### Defined in
67
+
68
+ [packages/ai-tool/src/utils/consts.ts:37](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/consts.ts#L37)
69
+
70
+ ___
71
+
72
+ ### name
73
+
74
+ • `Optional` **name**: `string`
75
+
76
+ #### Inherited from
77
+
78
+ [RemoteFuncItem](RemoteFuncItem.md).[name](RemoteFuncItem.md#name)
79
+
80
+ #### Defined in
81
+
82
+ [packages/ai-tool/src/tool-func.ts:21](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L21)
83
+
84
+ ___
85
+
86
+ ### params
87
+
88
+ • `Optional` **params**: [`FuncParams`](FuncParams.md) \| [`FuncParam`](FuncParam.md)[]
89
+
90
+ #### Inherited from
91
+
92
+ [RemoteFuncItem](RemoteFuncItem.md).[params](RemoteFuncItem.md#params)
93
+
94
+ #### Defined in
95
+
96
+ [packages/ai-tool/src/tool-func.ts:22](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L22)
97
+
98
+ ___
99
+
100
+ ### result
101
+
102
+ • `Optional` **result**: `string`
103
+
104
+ #### Inherited from
105
+
106
+ [RemoteFuncItem](RemoteFuncItem.md).[result](RemoteFuncItem.md#result)
107
+
108
+ #### Defined in
109
+
110
+ [packages/ai-tool/src/tool-func.ts:23](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L23)
111
+
112
+ ___
113
+
114
+ ### scope
115
+
116
+ • `Optional` **scope**: `any`
117
+
118
+ #### Inherited from
119
+
120
+ [RemoteFuncItem](RemoteFuncItem.md).[scope](RemoteFuncItem.md#scope)
121
+
122
+ #### Defined in
123
+
124
+ [packages/ai-tool/src/tool-func.ts:24](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L24)
125
+
126
+ ___
127
+
128
+ ### setup
129
+
130
+ • `Optional` **setup**: (`this`: [`ToolFunc`](../classes/ToolFunc.md), `options?`: [`FuncItem`](FuncItem.md)) => `void`
131
+
132
+ #### Type declaration
133
+
134
+ ▸ (`this`, `options?`): `void`
135
+
136
+ ##### Parameters
137
+
138
+ | Name | Type |
139
+ | :------ | :------ |
140
+ | `this` | [`ToolFunc`](../classes/ToolFunc.md) |
141
+ | `options?` | [`FuncItem`](FuncItem.md) |
142
+
143
+ ##### Returns
144
+
145
+ `void`
146
+
147
+ #### Inherited from
148
+
149
+ [RemoteFuncItem](RemoteFuncItem.md).[setup](RemoteFuncItem.md#setup)
150
+
151
+ #### Defined in
152
+
153
+ [packages/ai-tool/src/tool-func.ts:26](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L26)
154
+
155
+ ___
156
+
157
+ ### stream
158
+
159
+ • `Optional` **stream**: `boolean`
160
+
161
+ #### Inherited from
162
+
163
+ [RemoteFuncItem](RemoteFuncItem.md).[stream](RemoteFuncItem.md#stream)
164
+
165
+ #### Defined in
166
+
167
+ [packages/ai-tool/src/utils/consts.ts:38](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/consts.ts#L38)
168
+
169
+ ___
170
+
171
+ ### tags
172
+
173
+ • `Optional` **tags**: `string` \| `string`[]
174
+
175
+ #### Inherited from
176
+
177
+ [RemoteFuncItem](RemoteFuncItem.md).[tags](RemoteFuncItem.md#tags)
178
+
179
+ #### Defined in
180
+
181
+ [packages/ai-tool/src/tool-func.ts:25](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L25)