@isdk/ai-tool 0.1.4 → 0.2.0
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.
- package/dist/chunk-PXQPLL62.mjs +1 -0
- package/dist/chunk-W2LO3HZT.mjs +1 -0
- package/dist/find-port-qS1CZ9c-.d.mts +3 -0
- package/dist/find-port-qS1CZ9c-.d.ts +3 -0
- package/dist/funcs.d.mts +2 -2
- package/dist/funcs.d.ts +2 -2
- package/dist/funcs.js +1 -1
- package/dist/funcs.mjs +1 -1
- package/dist/{index-DvpywQaE.d.mts → index-nP9lSU6E.d.mts} +3 -151
- package/dist/{index-DvpywQaE.d.ts → index-nP9lSU6E.d.ts} +3 -151
- package/dist/index.d.mts +22 -4
- package/dist/index.d.ts +22 -4
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/test/util.d.mts +3 -3
- package/dist/test/util.d.ts +3 -3
- package/dist/test/util.js +1 -1
- package/dist/test/util.mjs +1 -1
- package/docs/classes/AbortError.md +15 -15
- package/docs/classes/AlreadyExistsError.md +15 -15
- package/docs/classes/BaseError.md +16 -16
- package/docs/classes/CancelableAbility.md +20 -20
- package/docs/classes/ClientTools.md +55 -55
- package/docs/classes/CommonError.md +24 -24
- package/docs/classes/EventClient.md +77 -77
- package/docs/classes/EventServer.md +78 -78
- package/docs/classes/EventToolFunc.md +46 -46
- package/docs/classes/FStringPromptTemplate.md +18 -18
- package/docs/classes/FewShotPromptTemplate.md +22 -22
- package/docs/classes/GolangPromptTemplate.md +18 -18
- package/docs/classes/HFEnvironment.md +9 -9
- package/docs/classes/HFInterpreter.md +19 -19
- package/docs/classes/HFTemplate.md +4 -4
- package/docs/classes/HfPromptTemplate.md +18 -18
- package/docs/classes/IntSet.md +12 -12
- package/docs/classes/NotFoundError.md +15 -15
- package/docs/classes/NotImplementationError.md +15 -15
- package/docs/classes/PromptExampleSelector.md +8 -8
- package/docs/classes/PromptTemplate.md +17 -17
- package/docs/classes/ReadableStreamError.md +15 -15
- package/docs/classes/ResClientTools.md +61 -61
- package/docs/classes/ResServerTools.md +62 -62
- package/docs/classes/SSEChannel.md +15 -15
- package/docs/classes/Semaphore.md +14 -14
- package/docs/classes/ServerTools.md +51 -51
- package/docs/classes/TaskAbortController.md +7 -7
- package/docs/classes/ToolFunc.md +43 -43
- package/docs/enums/AsyncFeatureBits.md +3 -3
- package/docs/enums/AsyncFeatures.md +3 -3
- package/docs/enums/ErrorCode.md +21 -21
- package/docs/enums/XXHashAlgorithm.md +2 -2
- package/docs/interfaces/AIChatAssistantMessageParam.md +6 -6
- package/docs/interfaces/AIChatContentPartImage.md +2 -2
- package/docs/interfaces/AIChatContentPartText.md +2 -2
- package/docs/interfaces/AIChatMessageParamBase.md +1 -1
- package/docs/interfaces/AIChatMessageToolCall.md +3 -3
- package/docs/interfaces/AIChatSystemMessageParam.md +3 -3
- package/docs/interfaces/AIChatToolMessageParam.md +4 -4
- package/docs/interfaces/AIChatUserMessageParam.md +7 -7
- package/docs/interfaces/AIChoiceConfig.md +7 -7
- package/docs/interfaces/AIResult.md +5 -5
- package/docs/interfaces/AIStreamParser.md +1 -1
- package/docs/interfaces/AIStreamParserOptions.md +1 -1
- package/docs/interfaces/BaseFunc.md +9 -9
- package/docs/interfaces/BaseFuncItem.md +8 -8
- package/docs/interfaces/CancelableAbilityOptions.md +2 -2
- package/docs/interfaces/ClientFuncItem.md +11 -11
- package/docs/interfaces/DotenvExpandOptions.md +3 -3
- package/docs/interfaces/DotenvExpandOutput.md +2 -2
- package/docs/interfaces/EventClientFuncParams.md +4 -4
- package/docs/interfaces/EventServerFuncParams.md +5 -5
- package/docs/interfaces/FewShotPromptTemplateOptions.md +11 -11
- package/docs/interfaces/FuncItem.md +9 -9
- package/docs/interfaces/FuncParam.md +6 -6
- package/docs/interfaces/ParseObjectArgumentOptions.md +5 -5
- package/docs/interfaces/PromptExampleSelectorOptions.md +2 -2
- package/docs/interfaces/PromptTemplateOptions.md +6 -6
- package/docs/interfaces/RemoteFuncItem.md +11 -11
- package/docs/interfaces/ResClientFuncParams.md +2 -2
- package/docs/interfaces/ResServerFuncParams.md +5 -5
- package/docs/interfaces/SanitizeFilenameOptions.md +2 -2
- package/docs/interfaces/ServerFuncItem.md +12 -12
- package/docs/interfaces/ServerFuncParams.md +2 -2
- package/docs/interfaces/StreamCallbacksAndOptions.md +4 -4
- package/docs/interfaces/TaskPromise.md +1 -1
- package/docs/interfaces/ToolFuncPackage.md +3 -3
- package/docs/modules.md +194 -152
- package/package.json +3 -1
- package/dist/chunk-O367BMRE.mjs +0 -1
|
@@ -98,7 +98,7 @@ BaseFactory.constructor
|
|
|
98
98
|
|
|
99
99
|
#### Defined in
|
|
100
100
|
|
|
101
|
-
[packages/ai-tool/src/utils/prompt/prompt-template.ts:69](https://github.com/isdk/ai-tool.js/blob/
|
|
101
|
+
[packages/ai-tool/src/utils/prompt/prompt-template.ts:69](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/prompt/prompt-template.ts#L69)
|
|
102
102
|
|
|
103
103
|
## Properties
|
|
104
104
|
|
|
@@ -108,7 +108,7 @@ BaseFactory.constructor
|
|
|
108
108
|
|
|
109
109
|
#### Defined in
|
|
110
110
|
|
|
111
|
-
[packages/ai-tool/src/utils/prompt/prompt-template.ts:21](https://github.com/isdk/ai-tool.js/blob/
|
|
111
|
+
[packages/ai-tool/src/utils/prompt/prompt-template.ts:21](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/prompt/prompt-template.ts#L21)
|
|
112
112
|
|
|
113
113
|
___
|
|
114
114
|
|
|
@@ -118,7 +118,7 @@ ___
|
|
|
118
118
|
|
|
119
119
|
#### Defined in
|
|
120
120
|
|
|
121
|
-
[packages/ai-tool/src/utils/prompt/prompt-template.ts:24](https://github.com/isdk/ai-tool.js/blob/
|
|
121
|
+
[packages/ai-tool/src/utils/prompt/prompt-template.ts:24](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/prompt/prompt-template.ts#L24)
|
|
122
122
|
|
|
123
123
|
___
|
|
124
124
|
|
|
@@ -128,7 +128,7 @@ ___
|
|
|
128
128
|
|
|
129
129
|
#### Defined in
|
|
130
130
|
|
|
131
|
-
[packages/ai-tool/src/utils/prompt/prompt-template.ts:25](https://github.com/isdk/ai-tool.js/blob/
|
|
131
|
+
[packages/ai-tool/src/utils/prompt/prompt-template.ts:25](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/prompt/prompt-template.ts#L25)
|
|
132
132
|
|
|
133
133
|
___
|
|
134
134
|
|
|
@@ -138,7 +138,7 @@ ___
|
|
|
138
138
|
|
|
139
139
|
#### Defined in
|
|
140
140
|
|
|
141
|
-
[packages/ai-tool/src/utils/prompt/prompt-template.ts:22](https://github.com/isdk/ai-tool.js/blob/
|
|
141
|
+
[packages/ai-tool/src/utils/prompt/prompt-template.ts:22](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/prompt/prompt-template.ts#L22)
|
|
142
142
|
|
|
143
143
|
___
|
|
144
144
|
|
|
@@ -148,7 +148,7 @@ ___
|
|
|
148
148
|
|
|
149
149
|
#### Defined in
|
|
150
150
|
|
|
151
|
-
[packages/ai-tool/src/utils/prompt/prompt-template.ts:23](https://github.com/isdk/ai-tool.js/blob/
|
|
151
|
+
[packages/ai-tool/src/utils/prompt/prompt-template.ts:23](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/prompt/prompt-template.ts#L23)
|
|
152
152
|
|
|
153
153
|
___
|
|
154
154
|
|
|
@@ -336,7 +336,7 @@ node_modules/.pnpm/custom-factory@2.3.0/node_modules/custom-factory/lib/base-fac
|
|
|
336
336
|
|
|
337
337
|
#### Defined in
|
|
338
338
|
|
|
339
|
-
[packages/ai-tool/src/utils/prompt/prompt-template.ts:105](https://github.com/isdk/ai-tool.js/blob/
|
|
339
|
+
[packages/ai-tool/src/utils/prompt/prompt-template.ts:105](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/prompt/prompt-template.ts#L105)
|
|
340
340
|
|
|
341
341
|
___
|
|
342
342
|
|
|
@@ -356,7 +356,7 @@ ___
|
|
|
356
356
|
|
|
357
357
|
#### Defined in
|
|
358
358
|
|
|
359
|
-
[packages/ai-tool/src/utils/prompt/prompt-template.ts:92](https://github.com/isdk/ai-tool.js/blob/
|
|
359
|
+
[packages/ai-tool/src/utils/prompt/prompt-template.ts:92](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/prompt/prompt-template.ts#L92)
|
|
360
360
|
|
|
361
361
|
___
|
|
362
362
|
|
|
@@ -378,7 +378,7 @@ Validate/filter the data in inputVariables
|
|
|
378
378
|
|
|
379
379
|
#### Defined in
|
|
380
380
|
|
|
381
|
-
[packages/ai-tool/src/utils/prompt/prompt-template.ts:62](https://github.com/isdk/ai-tool.js/blob/
|
|
381
|
+
[packages/ai-tool/src/utils/prompt/prompt-template.ts:62](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/prompt/prompt-template.ts#L62)
|
|
382
382
|
|
|
383
383
|
___
|
|
384
384
|
|
|
@@ -398,7 +398,7 @@ ___
|
|
|
398
398
|
|
|
399
399
|
#### Defined in
|
|
400
400
|
|
|
401
|
-
[packages/ai-tool/src/utils/prompt/prompt-template.ts:109](https://github.com/isdk/ai-tool.js/blob/
|
|
401
|
+
[packages/ai-tool/src/utils/prompt/prompt-template.ts:109](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/prompt/prompt-template.ts#L109)
|
|
402
402
|
|
|
403
403
|
___
|
|
404
404
|
|
|
@@ -422,7 +422,7 @@ BaseFactory.initialize
|
|
|
422
422
|
|
|
423
423
|
#### Defined in
|
|
424
424
|
|
|
425
|
-
[packages/ai-tool/src/utils/prompt/prompt-template.ts:96](https://github.com/isdk/ai-tool.js/blob/
|
|
425
|
+
[packages/ai-tool/src/utils/prompt/prompt-template.ts:96](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/prompt/prompt-template.ts#L96)
|
|
426
426
|
|
|
427
427
|
___
|
|
428
428
|
|
|
@@ -446,7 +446,7 @@ the new partial PromptTemplate instance
|
|
|
446
446
|
|
|
447
447
|
#### Defined in
|
|
448
448
|
|
|
449
|
-
[packages/ai-tool/src/utils/prompt/prompt-template.ts:139](https://github.com/isdk/ai-tool.js/blob/
|
|
449
|
+
[packages/ai-tool/src/utils/prompt/prompt-template.ts:139](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/prompt/prompt-template.ts#L139)
|
|
450
450
|
|
|
451
451
|
___
|
|
452
452
|
|
|
@@ -466,7 +466,7 @@ ___
|
|
|
466
466
|
|
|
467
467
|
#### Defined in
|
|
468
468
|
|
|
469
|
-
[packages/ai-tool/src/utils/prompt/prompt-template.ts:147](https://github.com/isdk/ai-tool.js/blob/
|
|
469
|
+
[packages/ai-tool/src/utils/prompt/prompt-template.ts:147](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/prompt/prompt-template.ts#L147)
|
|
470
470
|
|
|
471
471
|
___
|
|
472
472
|
|
|
@@ -671,7 +671,7 @@ ___
|
|
|
671
671
|
|
|
672
672
|
#### Defined in
|
|
673
673
|
|
|
674
|
-
[packages/ai-tool/src/utils/prompt/prompt-template.ts:31](https://github.com/isdk/ai-tool.js/blob/
|
|
674
|
+
[packages/ai-tool/src/utils/prompt/prompt-template.ts:31](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/prompt/prompt-template.ts#L31)
|
|
675
675
|
|
|
676
676
|
___
|
|
677
677
|
|
|
@@ -695,7 +695,7 @@ A Promise that resolves to the formatted result if options is a template; otherw
|
|
|
695
695
|
|
|
696
696
|
#### Defined in
|
|
697
697
|
|
|
698
|
-
[packages/ai-tool/src/utils/prompt/prompt-template.ts:41](https://github.com/isdk/ai-tool.js/blob/
|
|
698
|
+
[packages/ai-tool/src/utils/prompt/prompt-template.ts:41](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/prompt/prompt-template.ts#L41)
|
|
699
699
|
|
|
700
700
|
___
|
|
701
701
|
|
|
@@ -775,7 +775,7 @@ ___
|
|
|
775
775
|
|
|
776
776
|
#### Defined in
|
|
777
777
|
|
|
778
|
-
[packages/ai-tool/src/utils/prompt/prompt-template.ts:27](https://github.com/isdk/ai-tool.js/blob/
|
|
778
|
+
[packages/ai-tool/src/utils/prompt/prompt-template.ts:27](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/prompt/prompt-template.ts#L27)
|
|
779
779
|
|
|
780
780
|
___
|
|
781
781
|
|
|
@@ -957,7 +957,7 @@ ___
|
|
|
957
957
|
|
|
958
958
|
#### Defined in
|
|
959
959
|
|
|
960
|
-
[packages/ai-tool/src/utils/prompt/prompt-template.ts:48](https://github.com/isdk/ai-tool.js/blob/
|
|
960
|
+
[packages/ai-tool/src/utils/prompt/prompt-template.ts:48](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/prompt/prompt-template.ts#L48)
|
|
961
961
|
|
|
962
962
|
___
|
|
963
963
|
|
|
@@ -86,7 +86,7 @@ fromJSON - Creates a new BaseError instance from a JSON representation.
|
|
|
86
86
|
|
|
87
87
|
#### Defined in
|
|
88
88
|
|
|
89
|
-
[packages/ai-tool/src/utils/stream/error-readable-stream.ts:7](https://github.com/isdk/ai-tool.js/blob/
|
|
89
|
+
[packages/ai-tool/src/utils/stream/error-readable-stream.ts:7](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/stream/error-readable-stream.ts#L7)
|
|
90
90
|
|
|
91
91
|
## Properties
|
|
92
92
|
|
|
@@ -102,7 +102,7 @@ The name of the function that threw the error.
|
|
|
102
102
|
|
|
103
103
|
#### Defined in
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
node_modules/.pnpm/@isdk+common-error@0.1.1/node_modules/@isdk/common-error/dist/index.d.ts:63
|
|
106
106
|
|
|
107
107
|
___
|
|
108
108
|
|
|
@@ -122,7 +122,7 @@ ___
|
|
|
122
122
|
|
|
123
123
|
### code
|
|
124
124
|
|
|
125
|
-
• **code**:
|
|
125
|
+
• **code**: `ErrorCodeType`
|
|
126
126
|
|
|
127
127
|
#### Inherited from
|
|
128
128
|
|
|
@@ -130,7 +130,7 @@ ___
|
|
|
130
130
|
|
|
131
131
|
#### Defined in
|
|
132
132
|
|
|
133
|
-
|
|
133
|
+
node_modules/.pnpm/@isdk+common-error@0.1.1/node_modules/@isdk/common-error/dist/index.d.ts:64
|
|
134
134
|
|
|
135
135
|
___
|
|
136
136
|
|
|
@@ -146,7 +146,7 @@ Additional data associated with the error.
|
|
|
146
146
|
|
|
147
147
|
#### Defined in
|
|
148
148
|
|
|
149
|
-
|
|
149
|
+
node_modules/.pnpm/@isdk+common-error@0.1.1/node_modules/@isdk/common-error/dist/index.d.ts:65
|
|
150
150
|
|
|
151
151
|
___
|
|
152
152
|
|
|
@@ -194,7 +194,7 @@ ___
|
|
|
194
194
|
|
|
195
195
|
### code
|
|
196
196
|
|
|
197
|
-
▪ `Static` **code**:
|
|
197
|
+
▪ `Static` **code**: `ErrorCodeType`
|
|
198
198
|
|
|
199
199
|
The error code associated with the error.
|
|
200
200
|
|
|
@@ -204,7 +204,7 @@ The error code associated with the error.
|
|
|
204
204
|
|
|
205
205
|
#### Defined in
|
|
206
206
|
|
|
207
|
-
|
|
207
|
+
node_modules/.pnpm/@isdk+common-error@0.1.1/node_modules/@isdk/common-error/dist/index.d.ts:62
|
|
208
208
|
|
|
209
209
|
___
|
|
210
210
|
|
|
@@ -281,7 +281,7 @@ A new BaseError instance.
|
|
|
281
281
|
|
|
282
282
|
#### Defined in
|
|
283
283
|
|
|
284
|
-
|
|
284
|
+
node_modules/.pnpm/@isdk+common-error@0.1.1/node_modules/@isdk/common-error/dist/index.d.ts:87
|
|
285
285
|
|
|
286
286
|
___
|
|
287
287
|
|
|
@@ -303,7 +303,7 @@ A JSON representation of the error.
|
|
|
303
303
|
|
|
304
304
|
#### Defined in
|
|
305
305
|
|
|
306
|
-
|
|
306
|
+
node_modules/.pnpm/@isdk+common-error@0.1.1/node_modules/@isdk/common-error/dist/index.d.ts:80
|
|
307
307
|
|
|
308
308
|
___
|
|
309
309
|
|
|
@@ -340,11 +340,11 @@ ___
|
|
|
340
340
|
|
|
341
341
|
#### Parameters
|
|
342
342
|
|
|
343
|
-
| Name | Type |
|
|
344
|
-
| :------ | :------ |
|
|
345
|
-
| `aType` | `string` |
|
|
346
|
-
| `aErrorCode?` | `string` \| `number` \| typeof `AbstractError` |
|
|
347
|
-
| `ParentErrorClass
|
|
343
|
+
| Name | Type |
|
|
344
|
+
| :------ | :------ |
|
|
345
|
+
| `aType` | `string` |
|
|
346
|
+
| `aErrorCode?` | `string` \| `number` \| typeof `AbstractError` |
|
|
347
|
+
| `ParentErrorClass?` | typeof [`BaseError`](BaseError.md) |
|
|
348
348
|
|
|
349
349
|
#### Returns
|
|
350
350
|
|
|
@@ -356,4 +356,4 @@ typeof [`BaseError`](BaseError.md)
|
|
|
356
356
|
|
|
357
357
|
#### Defined in
|
|
358
358
|
|
|
359
|
-
|
|
359
|
+
node_modules/.pnpm/@isdk+common-error@0.1.1/node_modules/@isdk/common-error/dist/index.d.ts:66
|