@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,39 @@
1
+ [@isdk/ai-tool](../README.md) / [Exports](../modules.md) / PromptExampleSelectorOptions
2
+
3
+ # Interface: PromptExampleSelectorOptions
4
+
5
+ ## Indexable
6
+
7
+ ▪ [name: `string`]: `any`
8
+
9
+ ## Table of contents
10
+
11
+ ### Properties
12
+
13
+ - [maxLength](PromptExampleSelectorOptions.md#maxlength)
14
+ - [threshold](PromptExampleSelectorOptions.md#threshold)
15
+
16
+ ## Properties
17
+
18
+ ### maxLength
19
+
20
+ • `Optional` **maxLength**: `number`
21
+
22
+ The maximum count of the selected examples, or `undefined` if no limit.
23
+
24
+ #### Defined in
25
+
26
+ [packages/ai-tool/src/utils/prompt/prompt-example-selector.ts:9](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/prompt/prompt-example-selector.ts#L9)
27
+
28
+ ___
29
+
30
+ ### threshold
31
+
32
+ • `Optional` **threshold**: `number` \| `boolean`
33
+
34
+ The threshold probability (0-1) at which a sample is selected.
35
+ If `true`, defaults to 0.5; if `false`, disable it.
36
+
37
+ #### Defined in
38
+
39
+ [packages/ai-tool/src/utils/prompt/prompt-example-selector.ts:14](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/prompt/prompt-example-selector.ts#L14)
@@ -0,0 +1,84 @@
1
+ [@isdk/ai-tool](../README.md) / [Exports](../modules.md) / PromptTemplateOptions
2
+
3
+ # Interface: PromptTemplateOptions
4
+
5
+ ## Hierarchy
6
+
7
+ - **`PromptTemplateOptions`**
8
+
9
+ ↳ [`FewShotPromptTemplateOptions`](FewShotPromptTemplateOptions.md)
10
+
11
+ ## Indexable
12
+
13
+ ▪ [name: `string`]: `any`
14
+
15
+ ## Table of contents
16
+
17
+ ### Properties
18
+
19
+ - [compiledTemplate](PromptTemplateOptions.md#compiledtemplate)
20
+ - [data](PromptTemplateOptions.md#data)
21
+ - [ignoreInitialize](PromptTemplateOptions.md#ignoreinitialize)
22
+ - [inputVariables](PromptTemplateOptions.md#inputvariables)
23
+ - [template](PromptTemplateOptions.md#template)
24
+ - [templateFormat](PromptTemplateOptions.md#templateformat)
25
+
26
+ ## Properties
27
+
28
+ ### compiledTemplate
29
+
30
+ • `Optional` **compiledTemplate**: `any`
31
+
32
+ #### Defined in
33
+
34
+ [packages/ai-tool/src/utils/prompt/prompt-template.ts:15](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/prompt/prompt-template.ts#L15)
35
+
36
+ ___
37
+
38
+ ### data
39
+
40
+ • `Optional` **data**: `Record`\<`string`, `any`\>
41
+
42
+ #### Defined in
43
+
44
+ [packages/ai-tool/src/utils/prompt/prompt-template.ts:12](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/prompt/prompt-template.ts#L12)
45
+
46
+ ___
47
+
48
+ ### ignoreInitialize
49
+
50
+ • `Optional` **ignoreInitialize**: `boolean`
51
+
52
+ #### Defined in
53
+
54
+ [packages/ai-tool/src/utils/prompt/prompt-template.ts:16](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/prompt/prompt-template.ts#L16)
55
+
56
+ ___
57
+
58
+ ### inputVariables
59
+
60
+ • `Optional` **inputVariables**: `string`[]
61
+
62
+ #### Defined in
63
+
64
+ [packages/ai-tool/src/utils/prompt/prompt-template.ts:14](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/prompt/prompt-template.ts#L14)
65
+
66
+ ___
67
+
68
+ ### template
69
+
70
+ • `Optional` **template**: `string`
71
+
72
+ #### Defined in
73
+
74
+ [packages/ai-tool/src/utils/prompt/prompt-template.ts:11](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/prompt/prompt-template.ts#L11)
75
+
76
+ ___
77
+
78
+ ### templateFormat
79
+
80
+ • `Optional` **templateFormat**: `string`
81
+
82
+ #### Defined in
83
+
84
+ [packages/ai-tool/src/utils/prompt/prompt-template.ts:13](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/prompt/prompt-template.ts#L13)
@@ -0,0 +1,167 @@
1
+ [@isdk/ai-tool](../README.md) / [Exports](../modules.md) / RemoteFuncItem
2
+
3
+ # Interface: RemoteFuncItem
4
+
5
+ ## Hierarchy
6
+
7
+ - [`BaseFuncItem`](BaseFuncItem.md)
8
+
9
+ ↳ **`RemoteFuncItem`**
10
+
11
+ ↳↳ [`ClientFuncItem`](ClientFuncItem.md)
12
+
13
+ ↳↳ [`ServerFuncItem`](ServerFuncItem.md)
14
+
15
+ ## Table of contents
16
+
17
+ ### Properties
18
+
19
+ - [action](RemoteFuncItem.md#action)
20
+ - [apiRoot](RemoteFuncItem.md#apiroot)
21
+ - [fetchOptions](RemoteFuncItem.md#fetchoptions)
22
+ - [name](RemoteFuncItem.md#name)
23
+ - [params](RemoteFuncItem.md#params)
24
+ - [result](RemoteFuncItem.md#result)
25
+ - [scope](RemoteFuncItem.md#scope)
26
+ - [setup](RemoteFuncItem.md#setup)
27
+ - [stream](RemoteFuncItem.md#stream)
28
+ - [tags](RemoteFuncItem.md#tags)
29
+
30
+ ## Properties
31
+
32
+ ### action
33
+
34
+ • `Optional` **action**: ``"get"`` \| ``"post"`` \| ``"put"`` \| ``"delete"`` \| ``"patch"`` \| ``"list"`` \| ``"res"``
35
+
36
+ #### Defined in
37
+
38
+ [packages/ai-tool/src/utils/consts.ts:36](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/consts.ts#L36)
39
+
40
+ ___
41
+
42
+ ### apiRoot
43
+
44
+ • `Optional` **apiRoot**: `string`
45
+
46
+ #### Defined in
47
+
48
+ [packages/ai-tool/src/utils/consts.ts:35](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/consts.ts#L35)
49
+
50
+ ___
51
+
52
+ ### fetchOptions
53
+
54
+ • `Optional` **fetchOptions**: `any`
55
+
56
+ #### Defined in
57
+
58
+ [packages/ai-tool/src/utils/consts.ts:37](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/consts.ts#L37)
59
+
60
+ ___
61
+
62
+ ### name
63
+
64
+ • `Optional` **name**: `string`
65
+
66
+ #### Inherited from
67
+
68
+ [BaseFuncItem](BaseFuncItem.md).[name](BaseFuncItem.md#name)
69
+
70
+ #### Defined in
71
+
72
+ [packages/ai-tool/src/tool-func.ts:21](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L21)
73
+
74
+ ___
75
+
76
+ ### params
77
+
78
+ • `Optional` **params**: [`FuncParams`](FuncParams.md) \| [`FuncParam`](FuncParam.md)[]
79
+
80
+ #### Inherited from
81
+
82
+ [BaseFuncItem](BaseFuncItem.md).[params](BaseFuncItem.md#params)
83
+
84
+ #### Defined in
85
+
86
+ [packages/ai-tool/src/tool-func.ts:22](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L22)
87
+
88
+ ___
89
+
90
+ ### result
91
+
92
+ • `Optional` **result**: `string`
93
+
94
+ #### Inherited from
95
+
96
+ [BaseFuncItem](BaseFuncItem.md).[result](BaseFuncItem.md#result)
97
+
98
+ #### Defined in
99
+
100
+ [packages/ai-tool/src/tool-func.ts:23](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L23)
101
+
102
+ ___
103
+
104
+ ### scope
105
+
106
+ • `Optional` **scope**: `any`
107
+
108
+ #### Inherited from
109
+
110
+ [BaseFuncItem](BaseFuncItem.md).[scope](BaseFuncItem.md#scope)
111
+
112
+ #### Defined in
113
+
114
+ [packages/ai-tool/src/tool-func.ts:24](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L24)
115
+
116
+ ___
117
+
118
+ ### setup
119
+
120
+ • `Optional` **setup**: (`this`: [`ToolFunc`](../classes/ToolFunc.md), `options?`: [`FuncItem`](FuncItem.md)) => `void`
121
+
122
+ #### Type declaration
123
+
124
+ ▸ (`this`, `options?`): `void`
125
+
126
+ ##### Parameters
127
+
128
+ | Name | Type |
129
+ | :------ | :------ |
130
+ | `this` | [`ToolFunc`](../classes/ToolFunc.md) |
131
+ | `options?` | [`FuncItem`](FuncItem.md) |
132
+
133
+ ##### Returns
134
+
135
+ `void`
136
+
137
+ #### Inherited from
138
+
139
+ [BaseFuncItem](BaseFuncItem.md).[setup](BaseFuncItem.md#setup)
140
+
141
+ #### Defined in
142
+
143
+ [packages/ai-tool/src/tool-func.ts:26](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L26)
144
+
145
+ ___
146
+
147
+ ### stream
148
+
149
+ • `Optional` **stream**: `boolean`
150
+
151
+ #### Defined in
152
+
153
+ [packages/ai-tool/src/utils/consts.ts:38](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/consts.ts#L38)
154
+
155
+ ___
156
+
157
+ ### tags
158
+
159
+ • `Optional` **tags**: `string` \| `string`[]
160
+
161
+ #### Inherited from
162
+
163
+ [BaseFuncItem](BaseFuncItem.md).[tags](BaseFuncItem.md#tags)
164
+
165
+ #### Defined in
166
+
167
+ [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,34 @@
1
+ [@isdk/ai-tool](../README.md) / [Exports](../modules.md) / ResClientFuncParams
2
+
3
+ # Interface: ResClientFuncParams
4
+
5
+ ## Indexable
6
+
7
+ ▪ [name: `string`]: `any`
8
+
9
+ ## Table of contents
10
+
11
+ ### Properties
12
+
13
+ - [act](ResClientFuncParams.md#act)
14
+ - [id](ResClientFuncParams.md#id)
15
+
16
+ ## Properties
17
+
18
+ ### act
19
+
20
+ • `Optional` **act**: `string`
21
+
22
+ #### Defined in
23
+
24
+ [packages/ai-tool/src/res-client-tools.ts:7](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/res-client-tools.ts#L7)
25
+
26
+ ___
27
+
28
+ ### id
29
+
30
+ • `Optional` **id**: `string` \| `number`
31
+
32
+ #### Defined in
33
+
34
+ [packages/ai-tool/src/res-client-tools.ts:6](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/res-client-tools.ts#L6)
@@ -0,0 +1,79 @@
1
+ [@isdk/ai-tool](../README.md) / [Exports](../modules.md) / ResServerFuncParams
2
+
3
+ # Interface: ResServerFuncParams
4
+
5
+ Convention: Always pass _req, _res
6
+
7
+ ## Hierarchy
8
+
9
+ - [`ServerFuncParams`](ServerFuncParams.md)
10
+
11
+ ↳ **`ResServerFuncParams`**
12
+
13
+ ## Table of contents
14
+
15
+ ### Properties
16
+
17
+ - [\_req](ResServerFuncParams.md#_req)
18
+ - [\_res](ResServerFuncParams.md#_res)
19
+ - [act](ResServerFuncParams.md#act)
20
+ - [id](ResServerFuncParams.md#id)
21
+ - [val](ResServerFuncParams.md#val)
22
+
23
+ ## Properties
24
+
25
+ ### \_req
26
+
27
+ • `Optional` **\_req**: `IncomingMessage`
28
+
29
+ #### Inherited from
30
+
31
+ [ServerFuncParams](ServerFuncParams.md).[_req](ServerFuncParams.md#_req)
32
+
33
+ #### Defined in
34
+
35
+ [packages/ai-tool/src/server-tools.ts:9](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/server-tools.ts#L9)
36
+
37
+ ___
38
+
39
+ ### \_res
40
+
41
+ • `Optional` **\_res**: `ServerResponse`\<`IncomingMessage`\>
42
+
43
+ #### Inherited from
44
+
45
+ [ServerFuncParams](ServerFuncParams.md).[_res](ServerFuncParams.md#_res)
46
+
47
+ #### Defined in
48
+
49
+ [packages/ai-tool/src/server-tools.ts:10](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/server-tools.ts#L10)
50
+
51
+ ___
52
+
53
+ ### act
54
+
55
+ • `Optional` **act**: `string`
56
+
57
+ #### Defined in
58
+
59
+ [packages/ai-tool/src/res-server-tools.ts:11](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/res-server-tools.ts#L11)
60
+
61
+ ___
62
+
63
+ ### id
64
+
65
+ • `Optional` **id**: `string` \| `number`
66
+
67
+ #### Defined in
68
+
69
+ [packages/ai-tool/src/res-server-tools.ts:8](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/res-server-tools.ts#L8)
70
+
71
+ ___
72
+
73
+ ### val
74
+
75
+ • `Optional` **val**: `any`
76
+
77
+ #### Defined in
78
+
79
+ [packages/ai-tool/src/res-server-tools.ts:10](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/res-server-tools.ts#L10)
@@ -0,0 +1,30 @@
1
+ [@isdk/ai-tool](../README.md) / [Exports](../modules.md) / SanitizeFilenameOptions
2
+
3
+ # Interface: SanitizeFilenameOptions
4
+
5
+ ## Table of contents
6
+
7
+ ### Properties
8
+
9
+ - [maxLength](SanitizeFilenameOptions.md#maxlength)
10
+ - [replacement](SanitizeFilenameOptions.md#replacement)
11
+
12
+ ## Properties
13
+
14
+ ### maxLength
15
+
16
+ • `Optional` **maxLength**: `number`
17
+
18
+ #### Defined in
19
+
20
+ [packages/ai-tool/src/utils/filename.ts:85](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/filename.ts#L85)
21
+
22
+ ___
23
+
24
+ ### replacement
25
+
26
+ • `Optional` **replacement**: `string`
27
+
28
+ #### Defined in
29
+
30
+ [packages/ai-tool/src/utils/filename.ts:84](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/filename.ts#L84)
@@ -0,0 +1,192 @@
1
+ [@isdk/ai-tool](../README.md) / [Exports](../modules.md) / ServerFuncItem
2
+
3
+ # Interface: ServerFuncItem
4
+
5
+ ## Hierarchy
6
+
7
+ - [`RemoteFuncItem`](RemoteFuncItem.md)
8
+
9
+ ↳ **`ServerFuncItem`**
10
+
11
+ ↳↳ [`ServerTools`](../classes/ServerTools.md)
12
+
13
+ ## Table of contents
14
+
15
+ ### Properties
16
+
17
+ - [action](ServerFuncItem.md#action)
18
+ - [allowExportFunc](ServerFuncItem.md#allowexportfunc)
19
+ - [apiRoot](ServerFuncItem.md#apiroot)
20
+ - [fetchOptions](ServerFuncItem.md#fetchoptions)
21
+ - [name](ServerFuncItem.md#name)
22
+ - [params](ServerFuncItem.md#params)
23
+ - [result](ServerFuncItem.md#result)
24
+ - [scope](ServerFuncItem.md#scope)
25
+ - [setup](ServerFuncItem.md#setup)
26
+ - [stream](ServerFuncItem.md#stream)
27
+ - [tags](ServerFuncItem.md#tags)
28
+
29
+ ## Properties
30
+
31
+ ### action
32
+
33
+ • `Optional` **action**: ``"get"`` \| ``"post"`` \| ``"put"`` \| ``"delete"`` \| ``"patch"`` \| ``"list"`` \| ``"res"``
34
+
35
+ #### Inherited from
36
+
37
+ [RemoteFuncItem](RemoteFuncItem.md).[action](RemoteFuncItem.md#action)
38
+
39
+ #### Defined in
40
+
41
+ [packages/ai-tool/src/utils/consts.ts:36](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/consts.ts#L36)
42
+
43
+ ___
44
+
45
+ ### allowExportFunc
46
+
47
+ • `Optional` **allowExportFunc**: `boolean`
48
+
49
+ #### Defined in
50
+
51
+ [packages/ai-tool/src/server-tools.ts:14](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/server-tools.ts#L14)
52
+
53
+ ___
54
+
55
+ ### apiRoot
56
+
57
+ • `Optional` **apiRoot**: `string`
58
+
59
+ #### Inherited from
60
+
61
+ [RemoteFuncItem](RemoteFuncItem.md).[apiRoot](RemoteFuncItem.md#apiroot)
62
+
63
+ #### Defined in
64
+
65
+ [packages/ai-tool/src/utils/consts.ts:35](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/consts.ts#L35)
66
+
67
+ ___
68
+
69
+ ### fetchOptions
70
+
71
+ • `Optional` **fetchOptions**: `any`
72
+
73
+ #### Inherited from
74
+
75
+ [RemoteFuncItem](RemoteFuncItem.md).[fetchOptions](RemoteFuncItem.md#fetchoptions)
76
+
77
+ #### Defined in
78
+
79
+ [packages/ai-tool/src/utils/consts.ts:37](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/consts.ts#L37)
80
+
81
+ ___
82
+
83
+ ### name
84
+
85
+ • `Optional` **name**: `string`
86
+
87
+ #### Inherited from
88
+
89
+ [RemoteFuncItem](RemoteFuncItem.md).[name](RemoteFuncItem.md#name)
90
+
91
+ #### Defined in
92
+
93
+ [packages/ai-tool/src/tool-func.ts:21](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L21)
94
+
95
+ ___
96
+
97
+ ### params
98
+
99
+ • `Optional` **params**: [`FuncParams`](FuncParams.md) \| [`FuncParam`](FuncParam.md)[]
100
+
101
+ #### Inherited from
102
+
103
+ [RemoteFuncItem](RemoteFuncItem.md).[params](RemoteFuncItem.md#params)
104
+
105
+ #### Defined in
106
+
107
+ [packages/ai-tool/src/tool-func.ts:22](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L22)
108
+
109
+ ___
110
+
111
+ ### result
112
+
113
+ • `Optional` **result**: `string`
114
+
115
+ #### Inherited from
116
+
117
+ [RemoteFuncItem](RemoteFuncItem.md).[result](RemoteFuncItem.md#result)
118
+
119
+ #### Defined in
120
+
121
+ [packages/ai-tool/src/tool-func.ts:23](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L23)
122
+
123
+ ___
124
+
125
+ ### scope
126
+
127
+ • `Optional` **scope**: `any`
128
+
129
+ #### Inherited from
130
+
131
+ [RemoteFuncItem](RemoteFuncItem.md).[scope](RemoteFuncItem.md#scope)
132
+
133
+ #### Defined in
134
+
135
+ [packages/ai-tool/src/tool-func.ts:24](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L24)
136
+
137
+ ___
138
+
139
+ ### setup
140
+
141
+ • `Optional` **setup**: (`this`: [`ToolFunc`](../classes/ToolFunc.md), `options?`: [`FuncItem`](FuncItem.md)) => `void`
142
+
143
+ #### Type declaration
144
+
145
+ ▸ (`this`, `options?`): `void`
146
+
147
+ ##### Parameters
148
+
149
+ | Name | Type |
150
+ | :------ | :------ |
151
+ | `this` | [`ToolFunc`](../classes/ToolFunc.md) |
152
+ | `options?` | [`FuncItem`](FuncItem.md) |
153
+
154
+ ##### Returns
155
+
156
+ `void`
157
+
158
+ #### Inherited from
159
+
160
+ [RemoteFuncItem](RemoteFuncItem.md).[setup](RemoteFuncItem.md#setup)
161
+
162
+ #### Defined in
163
+
164
+ [packages/ai-tool/src/tool-func.ts:26](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/tool-func.ts#L26)
165
+
166
+ ___
167
+
168
+ ### stream
169
+
170
+ • `Optional` **stream**: `boolean`
171
+
172
+ #### Inherited from
173
+
174
+ [RemoteFuncItem](RemoteFuncItem.md).[stream](RemoteFuncItem.md#stream)
175
+
176
+ #### Defined in
177
+
178
+ [packages/ai-tool/src/utils/consts.ts:38](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/utils/consts.ts#L38)
179
+
180
+ ___
181
+
182
+ ### tags
183
+
184
+ • `Optional` **tags**: `string` \| `string`[]
185
+
186
+ #### Inherited from
187
+
188
+ [RemoteFuncItem](RemoteFuncItem.md).[tags](RemoteFuncItem.md#tags)
189
+
190
+ #### Defined in
191
+
192
+ [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,44 @@
1
+ [@isdk/ai-tool](../README.md) / [Exports](../modules.md) / ServerFuncParams
2
+
3
+ # Interface: ServerFuncParams
4
+
5
+ Convention: Always pass _req, _res
6
+
7
+ ## Hierarchy
8
+
9
+ - **`ServerFuncParams`**
10
+
11
+ ↳ [`EventServerFuncParams`](EventServerFuncParams.md)
12
+
13
+ ↳ [`ResServerFuncParams`](ResServerFuncParams.md)
14
+
15
+ ## Indexable
16
+
17
+ ▪ [name: `string`]: `any`
18
+
19
+ ## Table of contents
20
+
21
+ ### Properties
22
+
23
+ - [\_req](ServerFuncParams.md#_req)
24
+ - [\_res](ServerFuncParams.md#_res)
25
+
26
+ ## Properties
27
+
28
+ ### \_req
29
+
30
+ • `Optional` **\_req**: `IncomingMessage`
31
+
32
+ #### Defined in
33
+
34
+ [packages/ai-tool/src/server-tools.ts:9](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/server-tools.ts#L9)
35
+
36
+ ___
37
+
38
+ ### \_res
39
+
40
+ • `Optional` **\_res**: `ServerResponse`\<`IncomingMessage`\>
41
+
42
+ #### Defined in
43
+
44
+ [packages/ai-tool/src/server-tools.ts:10](https://github.com/isdk/ai-tool.js/blob/e7fb80e8b32da0eb475b223017e88d973ef7af19/src/server-tools.ts#L10)