@isdk/ai-tool 0.0.10 → 0.1.1
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-4LD7IUUG.mjs +1 -0
- package/dist/funcs.d.mts +1 -1
- package/dist/funcs.d.ts +1 -1
- package/dist/funcs.js +1 -1
- package/dist/funcs.mjs +1 -1
- package/dist/{index-Dgo3ZXPQ.d.mts → index-DvpywQaE.d.mts} +43 -35
- package/dist/{index-Dgo3ZXPQ.d.ts → index-DvpywQaE.d.ts} +43 -35
- package/dist/index.d.mts +120 -3
- package/dist/index.d.ts +120 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/docs/classes/AbortError.md +8 -8
- package/docs/classes/AlreadyExistsError.md +8 -8
- package/docs/classes/BaseError.md +8 -8
- package/docs/classes/CancelableAbility.md +20 -20
- package/docs/classes/ClientTools.md +94 -56
- package/docs/classes/CommonError.md +8 -8
- package/docs/classes/EventClient.md +117 -77
- package/docs/classes/EventServer.md +173 -74
- package/docs/classes/EventToolFunc.md +98 -43
- 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 +8 -8
- package/docs/classes/NotImplementationError.md +8 -8
- package/docs/classes/PromptExampleSelector.md +8 -8
- package/docs/classes/PromptTemplate.md +17 -17
- package/docs/classes/ReadableStreamError.md +8 -8
- package/docs/classes/ResClientTools.md +91 -491
- package/docs/classes/ResServerTools.md +133 -474
- package/docs/classes/SSEChannel.md +15 -15
- package/docs/classes/Semaphore.md +14 -14
- package/docs/classes/ServerTools.md +71 -54
- package/docs/classes/TaskAbortController.md +7 -7
- package/docs/classes/ToolFunc.md +91 -40
- 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 +85 -0
- 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 +37 -7
- package/docs/interfaces/BaseFuncItem.md +28 -6
- package/docs/interfaces/CancelableAbilityOptions.md +2 -2
- package/docs/interfaces/ClientFuncItem.md +25 -10
- 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 +37 -7
- package/docs/interfaces/FuncParam.md +6 -6
- package/docs/interfaces/PromptExampleSelectorOptions.md +2 -2
- package/docs/interfaces/PromptTemplateOptions.md +6 -6
- package/docs/interfaces/RemoteFuncItem.md +29 -10
- package/docs/interfaces/ResClientFuncParams.md +10 -4
- package/docs/interfaces/ResServerFuncParams.md +12 -10
- package/docs/interfaces/SanitizeFilenameOptions.md +2 -2
- package/docs/interfaces/ServerFuncItem.md +26 -11
- package/docs/interfaces/ServerFuncParams.md +2 -4
- 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 +466 -161
- package/package.json +3 -1
- package/dist/chunk-VNNDL7E2.mjs +0 -1
package/docs/modules.md
CHANGED
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
- [AIChatSystemMessageParam](interfaces/AIChatSystemMessageParam.md)
|
|
55
55
|
- [AIChatToolMessageParam](interfaces/AIChatToolMessageParam.md)
|
|
56
56
|
- [AIChatUserMessageParam](interfaces/AIChatUserMessageParam.md)
|
|
57
|
+
- [AIChoiceConfig](interfaces/AIChoiceConfig.md)
|
|
57
58
|
- [AIResult](interfaces/AIResult.md)
|
|
58
59
|
- [AIStreamParser](interfaces/AIStreamParser.md)
|
|
59
60
|
- [AIStreamParserOptions](interfaces/AIStreamParserOptions.md)
|
|
@@ -132,8 +133,6 @@
|
|
|
132
133
|
- [PromptTypes](modules.md#prompttypes)
|
|
133
134
|
- [RStreamErrCode](modules.md#rstreamerrcode)
|
|
134
135
|
- [RemoteToolFuncSchema](modules.md#remotetoolfuncschema)
|
|
135
|
-
- [ResClientToolsSchema](modules.md#resclienttoolsschema)
|
|
136
|
-
- [ResServerToolsSchema](modules.md#resservertoolsschema)
|
|
137
136
|
- [ResponseRStreamErrCode](modules.md#responserstreamerrcode)
|
|
138
137
|
- [SSEChannelAlreadyClosedErrCode](modules.md#ssechannelalreadyclosederrcode)
|
|
139
138
|
- [ServerToolFuncSchema](modules.md#servertoolfuncschema)
|
|
@@ -153,12 +152,16 @@
|
|
|
153
152
|
|
|
154
153
|
### Functions
|
|
155
154
|
|
|
155
|
+
- [AIArgProcessor](modules.md#aiargprocessor)
|
|
156
156
|
- [AIStream](modules.md#aistream)
|
|
157
|
+
- [ChoiceArgProcessor](modules.md#choiceargprocessor)
|
|
157
158
|
- [RateLimit](modules.md#ratelimit)
|
|
159
|
+
- [TemplateArgProcessor](modules.md#templateargprocessor)
|
|
158
160
|
- [\_lrucache](modules.md#_lrucache)
|
|
159
161
|
- [backendEventable](modules.md#backendeventable)
|
|
160
162
|
- [canonicalize](modules.md#canonicalize)
|
|
161
163
|
- [canonicalizeEx](modules.md#canonicalizeex)
|
|
164
|
+
- [countRegexMatches](modules.md#countregexmatches)
|
|
162
165
|
- [createAbilityInjector](modules.md#createabilityinjector)
|
|
163
166
|
- [createCallbacksTransformer](modules.md#createcallbackstransformer)
|
|
164
167
|
- [createEmptyReadableStream](modules.md#createemptyreadablestream)
|
|
@@ -171,7 +174,9 @@
|
|
|
171
174
|
- [expandEnv](modules.md#expandenv)
|
|
172
175
|
- [expandObjEnv](modules.md#expandobjenv)
|
|
173
176
|
- [extNameLevel](modules.md#extnamelevel)
|
|
177
|
+
- [fileIsExists](modules.md#fileisexists)
|
|
174
178
|
- [filenameReservedRegex](modules.md#filenamereservedregex-1)
|
|
179
|
+
- [filterValidFnScope](modules.md#filtervalidfnscope)
|
|
175
180
|
- [formatISO](modules.md#formatiso)
|
|
176
181
|
- [getAllEnumKeys](modules.md#getallenumkeys)
|
|
177
182
|
- [getConfigFileNames](modules.md#getconfigfilenames)
|
|
@@ -197,11 +202,17 @@
|
|
|
197
202
|
- [matchUrlProtocol](modules.md#matchurlprotocol)
|
|
198
203
|
- [messagesToText](modules.md#messagestotext)
|
|
199
204
|
- [paramsSizeToScaleStr](modules.md#paramssizetoscalestr)
|
|
205
|
+
- [parseCommand](modules.md#parsecommand)
|
|
200
206
|
- [parseDateFormat](modules.md#parsedateformat)
|
|
201
207
|
- [parseFString](modules.md#parsefstring)
|
|
202
208
|
- [parseISO](modules.md#parseiso)
|
|
203
209
|
- [parseJsJson](modules.md#parsejsjson)
|
|
210
|
+
- [parseObjectArgInfo](modules.md#parseobjectarginfo)
|
|
211
|
+
- [parseObjectArgumentInfos](modules.md#parseobjectargumentinfos)
|
|
212
|
+
- [parseObjectArguments](modules.md#parseobjectarguments)
|
|
213
|
+
- [parseObjectArgumentsAsArgInfos](modules.md#parseobjectargumentsasarginfos)
|
|
204
214
|
- [parseYaml](modules.md#parseyaml)
|
|
215
|
+
- [quoteStr](modules.md#quotestr)
|
|
205
216
|
- [reControlCharsRegex](modules.md#recontrolcharsregex)
|
|
206
217
|
- [readFilenamesRecursiveSync](modules.md#readfilenamesrecursivesync)
|
|
207
218
|
- [readableFromAsyncIterable](modules.md#readablefromasynciterable)
|
|
@@ -785,7 +796,7 @@ node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/toDate.d.ts:33
|
|
|
785
796
|
|
|
786
797
|
#### Defined in
|
|
787
798
|
|
|
788
|
-
[packages/ai-tool/src/utils/chat.ts:74](https://github.com/isdk/ai-tool.js/blob/
|
|
799
|
+
[packages/ai-tool/src/utils/chat.ts:74](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/chat.ts#L74)
|
|
789
800
|
|
|
790
801
|
___
|
|
791
802
|
|
|
@@ -795,7 +806,7 @@ ___
|
|
|
795
806
|
|
|
796
807
|
#### Defined in
|
|
797
808
|
|
|
798
|
-
[packages/ai-tool/src/utils/chat.ts:44](https://github.com/isdk/ai-tool.js/blob/
|
|
809
|
+
[packages/ai-tool/src/utils/chat.ts:44](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/chat.ts#L44)
|
|
799
810
|
|
|
800
811
|
___
|
|
801
812
|
|
|
@@ -805,7 +816,7 @@ ___
|
|
|
805
816
|
|
|
806
817
|
#### Defined in
|
|
807
818
|
|
|
808
|
-
[packages/ai-tool/src/utils/chat.ts:42](https://github.com/isdk/ai-tool.js/blob/
|
|
819
|
+
[packages/ai-tool/src/utils/chat.ts:42](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/chat.ts#L42)
|
|
809
820
|
|
|
810
821
|
___
|
|
811
822
|
|
|
@@ -815,7 +826,7 @@ ___
|
|
|
815
826
|
|
|
816
827
|
#### Defined in
|
|
817
828
|
|
|
818
|
-
[packages/ai-tool/src/utils/chat.ts:36](https://github.com/isdk/ai-tool.js/blob/
|
|
829
|
+
[packages/ai-tool/src/utils/chat.ts:36](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/chat.ts#L36)
|
|
819
830
|
|
|
820
831
|
___
|
|
821
832
|
|
|
@@ -825,7 +836,7 @@ ___
|
|
|
825
836
|
|
|
826
837
|
#### Defined in
|
|
827
838
|
|
|
828
|
-
[packages/ai-tool/src/utils/consts.ts:10](https://github.com/isdk/ai-tool.js/blob/
|
|
839
|
+
[packages/ai-tool/src/utils/consts.ts:10](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/consts.ts#L10)
|
|
829
840
|
|
|
830
841
|
___
|
|
831
842
|
|
|
@@ -849,7 +860,7 @@ ___
|
|
|
849
860
|
|
|
850
861
|
#### Defined in
|
|
851
862
|
|
|
852
|
-
[packages/ai-tool/src/utils/consts.ts:8](https://github.com/isdk/ai-tool.js/blob/
|
|
863
|
+
[packages/ai-tool/src/utils/consts.ts:8](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/consts.ts#L8)
|
|
853
864
|
|
|
854
865
|
___
|
|
855
866
|
|
|
@@ -859,7 +870,7 @@ ___
|
|
|
859
870
|
|
|
860
871
|
#### Defined in
|
|
861
872
|
|
|
862
|
-
[packages/ai-tool/src/utils/consts.ts:11](https://github.com/isdk/ai-tool.js/blob/
|
|
873
|
+
[packages/ai-tool/src/utils/consts.ts:11](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/consts.ts#L11)
|
|
863
874
|
|
|
864
875
|
___
|
|
865
876
|
|
|
@@ -869,7 +880,7 @@ ___
|
|
|
869
880
|
|
|
870
881
|
#### Defined in
|
|
871
882
|
|
|
872
|
-
[packages/ai-tool/src/utils/chat.ts:13](https://github.com/isdk/ai-tool.js/blob/
|
|
883
|
+
[packages/ai-tool/src/utils/chat.ts:13](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/chat.ts#L13)
|
|
873
884
|
|
|
874
885
|
___
|
|
875
886
|
|
|
@@ -879,7 +890,7 @@ ___
|
|
|
879
890
|
|
|
880
891
|
#### Defined in
|
|
881
892
|
|
|
882
|
-
[packages/ai-tool/src/utils/consts.ts:6](https://github.com/isdk/ai-tool.js/blob/
|
|
893
|
+
[packages/ai-tool/src/utils/consts.ts:6](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/consts.ts#L6)
|
|
883
894
|
|
|
884
895
|
___
|
|
885
896
|
|
|
@@ -889,7 +900,7 @@ ___
|
|
|
889
900
|
|
|
890
901
|
#### Defined in
|
|
891
902
|
|
|
892
|
-
[packages/ai-tool/src/utils/cancelable-ability.ts:8](https://github.com/isdk/ai-tool.js/blob/
|
|
903
|
+
[packages/ai-tool/src/utils/cancelable-ability.ts:8](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/cancelable-ability.ts#L8)
|
|
893
904
|
|
|
894
905
|
___
|
|
895
906
|
|
|
@@ -899,7 +910,7 @@ ___
|
|
|
899
910
|
|
|
900
911
|
#### Defined in
|
|
901
912
|
|
|
902
|
-
[packages/ai-tool/src/utils/base-error.ts:3](https://github.com/isdk/ai-tool.js/blob/
|
|
913
|
+
[packages/ai-tool/src/utils/base-error.ts:3](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/base-error.ts#L3)
|
|
903
914
|
|
|
904
915
|
___
|
|
905
916
|
|
|
@@ -926,7 +937,7 @@ ___
|
|
|
926
937
|
|
|
927
938
|
#### Defined in
|
|
928
939
|
|
|
929
|
-
[packages/ai-tool/src/utils/event/event-ability.ts:9](https://github.com/isdk/ai-tool.js/blob/
|
|
940
|
+
[packages/ai-tool/src/utils/event/event-ability.ts:9](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/event/event-ability.ts#L9)
|
|
930
941
|
|
|
931
942
|
___
|
|
932
943
|
|
|
@@ -952,7 +963,7 @@ ___
|
|
|
952
963
|
|
|
953
964
|
#### Defined in
|
|
954
965
|
|
|
955
|
-
[packages/ai-tool/src/utils/event/event-ability.ts:8](https://github.com/isdk/ai-tool.js/blob/
|
|
966
|
+
[packages/ai-tool/src/utils/event/event-ability.ts:8](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/event/event-ability.ts#L8)
|
|
956
967
|
|
|
957
968
|
___
|
|
958
969
|
|
|
@@ -965,7 +976,7 @@ a literal text or a variable name.
|
|
|
965
976
|
|
|
966
977
|
#### Defined in
|
|
967
978
|
|
|
968
|
-
[packages/ai-tool/src/utils/prompt/template/python.ts:6](https://github.com/isdk/ai-tool.js/blob/
|
|
979
|
+
[packages/ai-tool/src/utils/prompt/template/python.ts:6](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/prompt/template/python.ts#L6)
|
|
969
980
|
|
|
970
981
|
___
|
|
971
982
|
|
|
@@ -975,7 +986,7 @@ ___
|
|
|
975
986
|
|
|
976
987
|
#### Defined in
|
|
977
988
|
|
|
978
|
-
[packages/ai-tool/src/tool-func.ts:24](https://github.com/isdk/ai-tool.js/blob/
|
|
989
|
+
[packages/ai-tool/src/tool-func.ts:24](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/tool-func.ts#L24)
|
|
979
990
|
|
|
980
991
|
___
|
|
981
992
|
|
|
@@ -991,7 +1002,7 @@ ___
|
|
|
991
1002
|
|
|
992
1003
|
#### Defined in
|
|
993
1004
|
|
|
994
|
-
[packages/ai-tool/src/utils/prompt/prompt-example-selector.ts:3](https://github.com/isdk/ai-tool.js/blob/
|
|
1005
|
+
[packages/ai-tool/src/utils/prompt/prompt-example-selector.ts:3](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/prompt/prompt-example-selector.ts#L3)
|
|
995
1006
|
|
|
996
1007
|
___
|
|
997
1008
|
|
|
@@ -1001,7 +1012,7 @@ ___
|
|
|
1001
1012
|
|
|
1002
1013
|
#### Defined in
|
|
1003
1014
|
|
|
1004
|
-
[packages/ai-tool/src/utils/prompt/consts.ts:17](https://github.com/isdk/ai-tool.js/blob/
|
|
1015
|
+
[packages/ai-tool/src/utils/prompt/consts.ts:17](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/prompt/consts.ts#L17)
|
|
1005
1016
|
|
|
1006
1017
|
___
|
|
1007
1018
|
|
|
@@ -1011,7 +1022,7 @@ ___
|
|
|
1011
1022
|
|
|
1012
1023
|
#### Defined in
|
|
1013
1024
|
|
|
1014
|
-
[packages/ai-tool/src/utils/prompt/consts.ts:10](https://github.com/isdk/ai-tool.js/blob/
|
|
1025
|
+
[packages/ai-tool/src/utils/prompt/consts.ts:10](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/prompt/consts.ts#L10)
|
|
1015
1026
|
|
|
1016
1027
|
___
|
|
1017
1028
|
|
|
@@ -1036,7 +1047,7 @@ ___
|
|
|
1036
1047
|
|
|
1037
1048
|
#### Defined in
|
|
1038
1049
|
|
|
1039
|
-
[packages/ai-tool/src/tool-func.ts:38](https://github.com/isdk/ai-tool.js/blob/
|
|
1050
|
+
[packages/ai-tool/src/tool-func.ts:38](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/tool-func.ts#L38)
|
|
1040
1051
|
|
|
1041
1052
|
___
|
|
1042
1053
|
|
|
@@ -1046,7 +1057,7 @@ ___
|
|
|
1046
1057
|
|
|
1047
1058
|
#### Defined in
|
|
1048
1059
|
|
|
1049
|
-
[packages/ai-tool/src/utils/chat.ts:41](https://github.com/isdk/ai-tool.js/blob/
|
|
1060
|
+
[packages/ai-tool/src/utils/chat.ts:41](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/chat.ts#L41)
|
|
1050
1061
|
|
|
1051
1062
|
___
|
|
1052
1063
|
|
|
@@ -1056,7 +1067,7 @@ ___
|
|
|
1056
1067
|
|
|
1057
1068
|
#### Defined in
|
|
1058
1069
|
|
|
1059
|
-
[packages/ai-tool/src/utils/chat.ts:35](https://github.com/isdk/ai-tool.js/blob/
|
|
1070
|
+
[packages/ai-tool/src/utils/chat.ts:35](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/chat.ts#L35)
|
|
1060
1071
|
|
|
1061
1072
|
___
|
|
1062
1073
|
|
|
@@ -1066,7 +1077,7 @@ ___
|
|
|
1066
1077
|
|
|
1067
1078
|
#### Defined in
|
|
1068
1079
|
|
|
1069
|
-
[packages/ai-tool/src/utils/chat.ts:4](https://github.com/isdk/ai-tool.js/blob/
|
|
1080
|
+
[packages/ai-tool/src/utils/chat.ts:4](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/chat.ts#L4)
|
|
1070
1081
|
|
|
1071
1082
|
___
|
|
1072
1083
|
|
|
@@ -1076,7 +1087,7 @@ ___
|
|
|
1076
1087
|
|
|
1077
1088
|
#### Defined in
|
|
1078
1089
|
|
|
1079
|
-
[packages/ai-tool/src/utils/base-error.ts:33](https://github.com/isdk/ai-tool.js/blob/
|
|
1090
|
+
[packages/ai-tool/src/utils/base-error.ts:33](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/base-error.ts#L33)
|
|
1080
1091
|
|
|
1081
1092
|
___
|
|
1082
1093
|
|
|
@@ -1086,7 +1097,7 @@ ___
|
|
|
1086
1097
|
|
|
1087
1098
|
#### Defined in
|
|
1088
1099
|
|
|
1089
|
-
[packages/ai-tool/src/utils/consts.ts:5](https://github.com/isdk/ai-tool.js/blob/
|
|
1100
|
+
[packages/ai-tool/src/utils/consts.ts:5](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/consts.ts#L5)
|
|
1090
1101
|
|
|
1091
1102
|
___
|
|
1092
1103
|
|
|
@@ -1096,7 +1107,7 @@ ___
|
|
|
1096
1107
|
|
|
1097
1108
|
#### Defined in
|
|
1098
1109
|
|
|
1099
|
-
[packages/ai-tool/src/utils/base-error.ts:32](https://github.com/isdk/ai-tool.js/blob/
|
|
1110
|
+
[packages/ai-tool/src/utils/base-error.ts:32](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/base-error.ts#L32)
|
|
1100
1111
|
|
|
1101
1112
|
___
|
|
1102
1113
|
|
|
@@ -1119,12 +1130,10 @@ ___
|
|
|
1119
1130
|
| `apiRoot.set` | [object Object] |
|
|
1120
1131
|
| `fetchOptions` | \{ `type`: `string` = 'object' } |
|
|
1121
1132
|
| `fetchOptions.type` | `string` |
|
|
1122
|
-
| `stream` | \{ `type`: `string` = 'boolean' } |
|
|
1123
|
-
| `stream.type` | `string` |
|
|
1124
1133
|
|
|
1125
1134
|
#### Defined in
|
|
1126
1135
|
|
|
1127
|
-
[packages/ai-tool/src/client-tools.ts:153](https://github.com/isdk/ai-tool.js/blob/
|
|
1136
|
+
[packages/ai-tool/src/client-tools.ts:153](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/client-tools.ts#L153)
|
|
1128
1137
|
|
|
1129
1138
|
___
|
|
1130
1139
|
|
|
@@ -1134,7 +1143,7 @@ ___
|
|
|
1134
1143
|
|
|
1135
1144
|
#### Defined in
|
|
1136
1145
|
|
|
1137
|
-
[packages/ai-tool/src/utils/async-semaphore.ts:6](https://github.com/isdk/ai-tool.js/blob/
|
|
1146
|
+
[packages/ai-tool/src/utils/async-semaphore.ts:6](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/async-semaphore.ts#L6)
|
|
1138
1147
|
|
|
1139
1148
|
___
|
|
1140
1149
|
|
|
@@ -1144,7 +1153,7 @@ ___
|
|
|
1144
1153
|
|
|
1145
1154
|
#### Defined in
|
|
1146
1155
|
|
|
1147
|
-
[packages/ai-tool/src/utils/event/event-ability.ts:7](https://github.com/isdk/ai-tool.js/blob/
|
|
1156
|
+
[packages/ai-tool/src/utils/event/event-ability.ts:7](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/event/event-ability.ts#L7)
|
|
1148
1157
|
|
|
1149
1158
|
___
|
|
1150
1159
|
|
|
@@ -1154,7 +1163,7 @@ ___
|
|
|
1154
1163
|
|
|
1155
1164
|
#### Defined in
|
|
1156
1165
|
|
|
1157
|
-
[packages/ai-tool/src/utils/event/event-ability.ts:6](https://github.com/isdk/ai-tool.js/blob/
|
|
1166
|
+
[packages/ai-tool/src/utils/event/event-ability.ts:6](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/event/event-ability.ts#L6)
|
|
1158
1167
|
|
|
1159
1168
|
___
|
|
1160
1169
|
|
|
@@ -1167,7 +1176,7 @@ do not use /g global option here: when the regex is executed multiple times, it
|
|
|
1167
1176
|
|
|
1168
1177
|
#### Defined in
|
|
1169
1178
|
|
|
1170
|
-
[packages/ai-tool/src/utils/filename.ts:8](https://github.com/isdk/ai-tool.js/blob/
|
|
1179
|
+
[packages/ai-tool/src/utils/filename.ts:8](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/filename.ts#L8)
|
|
1171
1180
|
|
|
1172
1181
|
___
|
|
1173
1182
|
|
|
@@ -1185,7 +1194,7 @@ ___
|
|
|
1185
1194
|
|
|
1186
1195
|
#### Defined in
|
|
1187
1196
|
|
|
1188
|
-
[packages/ai-tool/src/utils/prompt/template/jinja/src/builtins.ts:61](https://github.com/isdk/ai-tool.js/blob/
|
|
1197
|
+
[packages/ai-tool/src/utils/prompt/template/jinja/src/builtins.ts:61](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/prompt/template/jinja/src/builtins.ts#L61)
|
|
1189
1198
|
|
|
1190
1199
|
___
|
|
1191
1200
|
|
|
@@ -1195,7 +1204,7 @@ ___
|
|
|
1195
1204
|
|
|
1196
1205
|
#### Defined in
|
|
1197
1206
|
|
|
1198
|
-
[packages/ai-tool/src/utils/base-error.ts:29](https://github.com/isdk/ai-tool.js/blob/
|
|
1207
|
+
[packages/ai-tool/src/utils/base-error.ts:29](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/base-error.ts#L29)
|
|
1199
1208
|
|
|
1200
1209
|
___
|
|
1201
1210
|
|
|
@@ -1205,7 +1214,7 @@ ___
|
|
|
1205
1214
|
|
|
1206
1215
|
#### Defined in
|
|
1207
1216
|
|
|
1208
|
-
[packages/ai-tool/src/utils/base-error.ts:31](https://github.com/isdk/ai-tool.js/blob/
|
|
1217
|
+
[packages/ai-tool/src/utils/base-error.ts:31](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/base-error.ts#L31)
|
|
1209
1218
|
|
|
1210
1219
|
___
|
|
1211
1220
|
|
|
@@ -1215,7 +1224,7 @@ ___
|
|
|
1215
1224
|
|
|
1216
1225
|
#### Defined in
|
|
1217
1226
|
|
|
1218
|
-
[packages/ai-tool/src/utils/base-error.ts:30](https://github.com/isdk/ai-tool.js/blob/
|
|
1227
|
+
[packages/ai-tool/src/utils/base-error.ts:30](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/base-error.ts#L30)
|
|
1219
1228
|
|
|
1220
1229
|
___
|
|
1221
1230
|
|
|
@@ -1225,7 +1234,7 @@ ___
|
|
|
1225
1234
|
|
|
1226
1235
|
#### Defined in
|
|
1227
1236
|
|
|
1228
|
-
[packages/ai-tool/src/utils/consts.ts:3](https://github.com/isdk/ai-tool.js/blob/
|
|
1237
|
+
[packages/ai-tool/src/utils/consts.ts:3](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/consts.ts#L3)
|
|
1229
1238
|
|
|
1230
1239
|
___
|
|
1231
1240
|
|
|
@@ -1235,7 +1244,7 @@ ___
|
|
|
1235
1244
|
|
|
1236
1245
|
#### Defined in
|
|
1237
1246
|
|
|
1238
|
-
[packages/ai-tool/src/utils/prompt/consts.ts:12](https://github.com/isdk/ai-tool.js/blob/
|
|
1247
|
+
[packages/ai-tool/src/utils/prompt/consts.ts:12](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/prompt/consts.ts#L12)
|
|
1239
1248
|
|
|
1240
1249
|
___
|
|
1241
1250
|
|
|
@@ -1248,7 +1257,7 @@ defaults to `chat`
|
|
|
1248
1257
|
|
|
1249
1258
|
#### Defined in
|
|
1250
1259
|
|
|
1251
|
-
[packages/ai-tool/src/utils/prompt/consts.ts:5](https://github.com/isdk/ai-tool.js/blob/
|
|
1260
|
+
[packages/ai-tool/src/utils/prompt/consts.ts:5](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/prompt/consts.ts#L5)
|
|
1252
1261
|
|
|
1253
1262
|
___
|
|
1254
1263
|
|
|
@@ -1258,7 +1267,7 @@ ___
|
|
|
1258
1267
|
|
|
1259
1268
|
#### Defined in
|
|
1260
1269
|
|
|
1261
|
-
[packages/ai-tool/src/utils/stream/error-readable-stream.ts:3](https://github.com/isdk/ai-tool.js/blob/
|
|
1270
|
+
[packages/ai-tool/src/utils/stream/error-readable-stream.ts:3](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/stream/error-readable-stream.ts#L3)
|
|
1262
1271
|
|
|
1263
1272
|
___
|
|
1264
1273
|
|
|
@@ -1281,47 +1290,10 @@ ___
|
|
|
1281
1290
|
| `apiRoot.set` | [object Object] |
|
|
1282
1291
|
| `fetchOptions` | \{ `type`: `string` = 'object' } |
|
|
1283
1292
|
| `fetchOptions.type` | `string` |
|
|
1284
|
-
| `stream` | \{ `type`: `string` = 'boolean' } |
|
|
1285
|
-
| `stream.type` | `string` |
|
|
1286
|
-
|
|
1287
|
-
#### Defined in
|
|
1288
|
-
|
|
1289
|
-
[packages/ai-tool/src/utils/consts.ts:13](https://github.com/isdk/ai-tool.js/blob/409aab70514a73e5edfa59ea25e4ee1fe316b26d/src/utils/consts.ts#L13)
|
|
1290
|
-
|
|
1291
|
-
___
|
|
1292
|
-
|
|
1293
|
-
### ResClientToolsSchema
|
|
1294
|
-
|
|
1295
|
-
• `Const` **ResClientToolsSchema**: `Object`
|
|
1296
|
-
|
|
1297
|
-
#### Type declaration
|
|
1298
|
-
|
|
1299
|
-
| Name | Type |
|
|
1300
|
-
| :------ | :------ |
|
|
1301
|
-
| `methods` | \{ `type`: `string` = 'array'; `assign`: (`value`: `string`[], `dest`: `any`, `src?`: `any`, `name?`: `string`, `options?`: `any`) => `void` } |
|
|
1302
|
-
| `methods.type` | `string` |
|
|
1303
|
-
| `methods.assign` | [object Object] |
|
|
1304
1293
|
|
|
1305
1294
|
#### Defined in
|
|
1306
1295
|
|
|
1307
|
-
[packages/ai-tool/src/
|
|
1308
|
-
|
|
1309
|
-
___
|
|
1310
|
-
|
|
1311
|
-
### ResServerToolsSchema
|
|
1312
|
-
|
|
1313
|
-
• `Const` **ResServerToolsSchema**: `Object`
|
|
1314
|
-
|
|
1315
|
-
#### Type declaration
|
|
1316
|
-
|
|
1317
|
-
| Name | Type |
|
|
1318
|
-
| :------ | :------ |
|
|
1319
|
-
| `methods` | \{ `type`: `string` = 'array' } |
|
|
1320
|
-
| `methods.type` | `string` |
|
|
1321
|
-
|
|
1322
|
-
#### Defined in
|
|
1323
|
-
|
|
1324
|
-
[packages/ai-tool/src/res-server-tools.ts:77](https://github.com/isdk/ai-tool.js/blob/409aab70514a73e5edfa59ea25e4ee1fe316b26d/src/res-server-tools.ts#L77)
|
|
1296
|
+
[packages/ai-tool/src/utils/consts.ts:13](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/consts.ts#L13)
|
|
1325
1297
|
|
|
1326
1298
|
___
|
|
1327
1299
|
|
|
@@ -1331,7 +1303,7 @@ ___
|
|
|
1331
1303
|
|
|
1332
1304
|
#### Defined in
|
|
1333
1305
|
|
|
1334
|
-
[packages/ai-tool/src/utils/stream/error-readable-stream.ts:4](https://github.com/isdk/ai-tool.js/blob/
|
|
1306
|
+
[packages/ai-tool/src/utils/stream/error-readable-stream.ts:4](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/stream/error-readable-stream.ts#L4)
|
|
1335
1307
|
|
|
1336
1308
|
___
|
|
1337
1309
|
|
|
@@ -1341,7 +1313,7 @@ ___
|
|
|
1341
1313
|
|
|
1342
1314
|
#### Defined in
|
|
1343
1315
|
|
|
1344
|
-
[packages/ai-tool/src/utils/event/sse-channel.ts:17](https://github.com/isdk/ai-tool.js/blob/
|
|
1316
|
+
[packages/ai-tool/src/utils/event/sse-channel.ts:17](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/event/sse-channel.ts#L17)
|
|
1345
1317
|
|
|
1346
1318
|
___
|
|
1347
1319
|
|
|
@@ -1364,12 +1336,10 @@ ___
|
|
|
1364
1336
|
| `apiRoot.set` | [object Object] |
|
|
1365
1337
|
| `fetchOptions` | \{ `type`: `string` = 'object' } |
|
|
1366
1338
|
| `fetchOptions.type` | `string` |
|
|
1367
|
-
| `stream` | \{ `type`: `string` = 'boolean' } |
|
|
1368
|
-
| `stream.type` | `string` |
|
|
1369
1339
|
|
|
1370
1340
|
#### Defined in
|
|
1371
1341
|
|
|
1372
|
-
[packages/ai-tool/src/server-tools.ts:
|
|
1342
|
+
[packages/ai-tool/src/server-tools.ts:62](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/server-tools.ts#L62)
|
|
1373
1343
|
|
|
1374
1344
|
___
|
|
1375
1345
|
|
|
@@ -1379,7 +1349,7 @@ ___
|
|
|
1379
1349
|
|
|
1380
1350
|
#### Defined in
|
|
1381
1351
|
|
|
1382
|
-
[packages/ai-tool/src/tool-func.ts:8](https://github.com/isdk/ai-tool.js/blob/
|
|
1352
|
+
[packages/ai-tool/src/tool-func.ts:8](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/tool-func.ts#L8)
|
|
1383
1353
|
|
|
1384
1354
|
___
|
|
1385
1355
|
|
|
@@ -1389,7 +1359,7 @@ ___
|
|
|
1389
1359
|
|
|
1390
1360
|
#### Defined in
|
|
1391
1361
|
|
|
1392
|
-
[packages/ai-tool/src/tool-func.ts:7](https://github.com/isdk/ai-tool.js/blob/
|
|
1362
|
+
[packages/ai-tool/src/tool-func.ts:7](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/tool-func.ts#L7)
|
|
1393
1363
|
|
|
1394
1364
|
___
|
|
1395
1365
|
|
|
@@ -1399,7 +1369,7 @@ ___
|
|
|
1399
1369
|
|
|
1400
1370
|
#### Defined in
|
|
1401
1371
|
|
|
1402
|
-
[packages/ai-tool/src/tool-func.ts:9](https://github.com/isdk/ai-tool.js/blob/
|
|
1372
|
+
[packages/ai-tool/src/tool-func.ts:9](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/tool-func.ts#L9)
|
|
1403
1373
|
|
|
1404
1374
|
___
|
|
1405
1375
|
|
|
@@ -1421,6 +1391,8 @@ ___
|
|
|
1421
1391
|
| `func` | \{ `type`: `string` = 'function'; `assign`: (`value`: `string` \| `Function`, `dest`: [`ToolFunc`](classes/ToolFunc.md), `src?`: [`ToolFunc`](classes/ToolFunc.md), `name?`: `string`, `options?`: `any`) => `string` \| `Function` } |
|
|
1422
1392
|
| `func.type` | `string` |
|
|
1423
1393
|
| `func.assign` | [object Object] |
|
|
1394
|
+
| `isApi` | \{ `type`: `string` = 'boolean' } |
|
|
1395
|
+
| `isApi.type` | `string` |
|
|
1424
1396
|
| `name` | \{ `type`: `string` = 'string' } |
|
|
1425
1397
|
| `name.type` | `string` |
|
|
1426
1398
|
| `params` | \{ `type`: `string` = 'object' } |
|
|
@@ -1429,12 +1401,14 @@ ___
|
|
|
1429
1401
|
| `result.type` | `string` |
|
|
1430
1402
|
| `setup` | \{ `type`: `string` = 'function' } |
|
|
1431
1403
|
| `setup.type` | `string` |
|
|
1404
|
+
| `stream` | \{ `type`: `string` = 'boolean' } |
|
|
1405
|
+
| `stream.type` | `string` |
|
|
1432
1406
|
| `tags` | \{ `type`: `string`[] } |
|
|
1433
1407
|
| `tags.type` | `string`[] |
|
|
1434
1408
|
|
|
1435
1409
|
#### Defined in
|
|
1436
1410
|
|
|
1437
|
-
[packages/ai-tool/src/tool-func.ts:
|
|
1411
|
+
[packages/ai-tool/src/tool-func.ts:348](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/tool-func.ts#L348)
|
|
1438
1412
|
|
|
1439
1413
|
___
|
|
1440
1414
|
|
|
@@ -1446,7 +1420,7 @@ Regular expression pattern for reserved names on Windows systems.
|
|
|
1446
1420
|
|
|
1447
1421
|
#### Defined in
|
|
1448
1422
|
|
|
1449
|
-
[packages/ai-tool/src/utils/filename.ts:13](https://github.com/isdk/ai-tool.js/blob/
|
|
1423
|
+
[packages/ai-tool/src/utils/filename.ts:13](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/filename.ts#L13)
|
|
1450
1424
|
|
|
1451
1425
|
___
|
|
1452
1426
|
|
|
@@ -1456,7 +1430,7 @@ ___
|
|
|
1456
1430
|
|
|
1457
1431
|
#### Defined in
|
|
1458
1432
|
|
|
1459
|
-
[packages/ai-tool/src/utils/hash/xxhash.ts:5](https://github.com/isdk/ai-tool.js/blob/
|
|
1433
|
+
[packages/ai-tool/src/utils/hash/xxhash.ts:5](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/hash/xxhash.ts#L5)
|
|
1460
1434
|
|
|
1461
1435
|
___
|
|
1462
1436
|
|
|
@@ -1466,7 +1440,7 @@ ___
|
|
|
1466
1440
|
|
|
1467
1441
|
#### Defined in
|
|
1468
1442
|
|
|
1469
|
-
[packages/ai-tool/src/utils/prompt/prompt-template.ts:8](https://github.com/isdk/ai-tool.js/blob/
|
|
1443
|
+
[packages/ai-tool/src/utils/prompt/prompt-template.ts:8](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/prompt/prompt-template.ts#L8)
|
|
1470
1444
|
|
|
1471
1445
|
___
|
|
1472
1446
|
|
|
@@ -1476,7 +1450,7 @@ ___
|
|
|
1476
1450
|
|
|
1477
1451
|
#### Defined in
|
|
1478
1452
|
|
|
1479
|
-
[packages/ai-tool/src/funcs/event.ts:22](https://github.com/isdk/ai-tool.js/blob/
|
|
1453
|
+
[packages/ai-tool/src/funcs/event.ts:22](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/funcs/event.ts#L22)
|
|
1480
1454
|
|
|
1481
1455
|
___
|
|
1482
1456
|
|
|
@@ -1486,7 +1460,7 @@ ___
|
|
|
1486
1460
|
|
|
1487
1461
|
#### Defined in
|
|
1488
1462
|
|
|
1489
|
-
[packages/ai-tool/src/funcs/event-client.ts:180](https://github.com/isdk/ai-tool.js/blob/
|
|
1463
|
+
[packages/ai-tool/src/funcs/event-client.ts:180](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/funcs/event-client.ts#L180)
|
|
1490
1464
|
|
|
1491
1465
|
___
|
|
1492
1466
|
|
|
@@ -1496,7 +1470,7 @@ ___
|
|
|
1496
1470
|
|
|
1497
1471
|
#### Defined in
|
|
1498
1472
|
|
|
1499
|
-
[packages/ai-tool/src/funcs/event-server.ts:133](https://github.com/isdk/ai-tool.js/blob/
|
|
1473
|
+
[packages/ai-tool/src/funcs/event-server.ts:133](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/funcs/event-server.ts#L133)
|
|
1500
1474
|
|
|
1501
1475
|
___
|
|
1502
1476
|
|
|
@@ -1506,7 +1480,7 @@ ___
|
|
|
1506
1480
|
|
|
1507
1481
|
#### Defined in
|
|
1508
1482
|
|
|
1509
|
-
[packages/ai-tool/src/funcs/lrucache.ts:40](https://github.com/isdk/ai-tool.js/blob/
|
|
1483
|
+
[packages/ai-tool/src/funcs/lrucache.ts:40](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/funcs/lrucache.ts#L40)
|
|
1510
1484
|
|
|
1511
1485
|
___
|
|
1512
1486
|
|
|
@@ -1530,6 +1504,28 @@ node_modules/.pnpm/@types+uuid@9.0.8/node_modules/@types/uuid/index.d.ts:78
|
|
|
1530
1504
|
|
|
1531
1505
|
___
|
|
1532
1506
|
|
|
1507
|
+
### AIArgProcessor
|
|
1508
|
+
|
|
1509
|
+
▸ **AIArgProcessor**(`argInfo`, `ix`, `scope?`): `Promise`\<`undefined` \| `string`\>
|
|
1510
|
+
|
|
1511
|
+
#### Parameters
|
|
1512
|
+
|
|
1513
|
+
| Name | Type |
|
|
1514
|
+
| :------ | :------ |
|
|
1515
|
+
| `argInfo` | `ArgInfo` |
|
|
1516
|
+
| `ix` | `number` |
|
|
1517
|
+
| `scope?` | `Record`\<`string`, `any`\> |
|
|
1518
|
+
|
|
1519
|
+
#### Returns
|
|
1520
|
+
|
|
1521
|
+
`Promise`\<`undefined` \| `string`\>
|
|
1522
|
+
|
|
1523
|
+
#### Defined in
|
|
1524
|
+
|
|
1525
|
+
[packages/ai-tool/src/utils/parse-command.ts:121](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/parse-command.ts#L121)
|
|
1526
|
+
|
|
1527
|
+
___
|
|
1528
|
+
|
|
1533
1529
|
### AIStream
|
|
1534
1530
|
|
|
1535
1531
|
▸ **AIStream**\<`T`, `TOptions`\>(`response`, `customParser?`): `ReadableStream`\<[`AIResult`](interfaces/AIResult.md)\<`T`, `TOptions`\>\>
|
|
@@ -1571,7 +1567,29 @@ Will throw an error if the response is not OK.
|
|
|
1571
1567
|
|
|
1572
1568
|
#### Defined in
|
|
1573
1569
|
|
|
1574
|
-
[packages/ai-tool/src/utils/stream/ai-stream.ts:122](https://github.com/isdk/ai-tool.js/blob/
|
|
1570
|
+
[packages/ai-tool/src/utils/stream/ai-stream.ts:122](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/stream/ai-stream.ts#L122)
|
|
1571
|
+
|
|
1572
|
+
___
|
|
1573
|
+
|
|
1574
|
+
### ChoiceArgProcessor
|
|
1575
|
+
|
|
1576
|
+
▸ **ChoiceArgProcessor**(`argInfo`, `_ix`, `scope?`): `undefined` \| `string`
|
|
1577
|
+
|
|
1578
|
+
#### Parameters
|
|
1579
|
+
|
|
1580
|
+
| Name | Type |
|
|
1581
|
+
| :------ | :------ |
|
|
1582
|
+
| `argInfo` | `ArgInfo` |
|
|
1583
|
+
| `_ix` | `number` |
|
|
1584
|
+
| `scope?` | `Record`\<`string`, `any`\> |
|
|
1585
|
+
|
|
1586
|
+
#### Returns
|
|
1587
|
+
|
|
1588
|
+
`undefined` \| `string`
|
|
1589
|
+
|
|
1590
|
+
#### Defined in
|
|
1591
|
+
|
|
1592
|
+
[packages/ai-tool/src/utils/parse-command.ts:90](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/parse-command.ts#L90)
|
|
1575
1593
|
|
|
1576
1594
|
___
|
|
1577
1595
|
|
|
@@ -1602,7 +1620,29 @@ Creates a rate limiter function that blocks with a promise whenever the rate lim
|
|
|
1602
1620
|
|
|
1603
1621
|
#### Defined in
|
|
1604
1622
|
|
|
1605
|
-
[packages/ai-tool/src/utils/async-semaphore.ts:347](https://github.com/isdk/ai-tool.js/blob/
|
|
1623
|
+
[packages/ai-tool/src/utils/async-semaphore.ts:347](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/async-semaphore.ts#L347)
|
|
1624
|
+
|
|
1625
|
+
___
|
|
1626
|
+
|
|
1627
|
+
### TemplateArgProcessor
|
|
1628
|
+
|
|
1629
|
+
▸ **TemplateArgProcessor**(`«destructured»`, `ix`, `scope?`): `Promise`\<`undefined` \| `string`\>
|
|
1630
|
+
|
|
1631
|
+
#### Parameters
|
|
1632
|
+
|
|
1633
|
+
| Name | Type |
|
|
1634
|
+
| :------ | :------ |
|
|
1635
|
+
| `«destructured»` | `ArgInfo` |
|
|
1636
|
+
| `ix` | `number` |
|
|
1637
|
+
| `scope?` | `Record`\<`string`, `any`\> |
|
|
1638
|
+
|
|
1639
|
+
#### Returns
|
|
1640
|
+
|
|
1641
|
+
`Promise`\<`undefined` \| `string`\>
|
|
1642
|
+
|
|
1643
|
+
#### Defined in
|
|
1644
|
+
|
|
1645
|
+
[packages/ai-tool/src/utils/parse-command.ts:97](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/parse-command.ts#L97)
|
|
1606
1646
|
|
|
1607
1647
|
___
|
|
1608
1648
|
|
|
@@ -1626,7 +1666,7 @@ ___
|
|
|
1626
1666
|
|
|
1627
1667
|
#### Defined in
|
|
1628
1668
|
|
|
1629
|
-
[packages/ai-tool/src/funcs/lrucache.ts:6](https://github.com/isdk/ai-tool.js/blob/
|
|
1669
|
+
[packages/ai-tool/src/funcs/lrucache.ts:6](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/funcs/lrucache.ts#L6)
|
|
1630
1670
|
|
|
1631
1671
|
___
|
|
1632
1672
|
|
|
@@ -1647,7 +1687,7 @@ ___
|
|
|
1647
1687
|
|
|
1648
1688
|
#### Defined in
|
|
1649
1689
|
|
|
1650
|
-
[packages/ai-tool/src/utils/event/event-ability.ts:80](https://github.com/isdk/ai-tool.js/blob/
|
|
1690
|
+
[packages/ai-tool/src/utils/event/event-ability.ts:80](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/event/event-ability.ts#L80)
|
|
1651
1691
|
|
|
1652
1692
|
___
|
|
1653
1693
|
|
|
@@ -1692,6 +1732,33 @@ node_modules/.pnpm/json-canonicalize@1.0.6/node_modules/json-canonicalize/types/
|
|
|
1692
1732
|
|
|
1693
1733
|
___
|
|
1694
1734
|
|
|
1735
|
+
### countRegexMatches
|
|
1736
|
+
|
|
1737
|
+
▸ **countRegexMatches**(`content`, `regex`): `number`
|
|
1738
|
+
|
|
1739
|
+
Counts the number of matches for a given regular expression in a specified string.
|
|
1740
|
+
This function ensures that the regular expression is used globally by adding the 'g' flag,
|
|
1741
|
+
if it is not already present.
|
|
1742
|
+
|
|
1743
|
+
#### Parameters
|
|
1744
|
+
|
|
1745
|
+
| Name | Type | Description |
|
|
1746
|
+
| :------ | :------ | :------ |
|
|
1747
|
+
| `content` | `string` | The string to search within. |
|
|
1748
|
+
| `regex` | `RegExp` | The regular expression to use for matching. |
|
|
1749
|
+
|
|
1750
|
+
#### Returns
|
|
1751
|
+
|
|
1752
|
+
`number`
|
|
1753
|
+
|
|
1754
|
+
The total number of matches found.
|
|
1755
|
+
|
|
1756
|
+
#### Defined in
|
|
1757
|
+
|
|
1758
|
+
[packages/ai-tool/src/utils/count-regex-matches.ts:10](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/count-regex-matches.ts#L10)
|
|
1759
|
+
|
|
1760
|
+
___
|
|
1761
|
+
|
|
1695
1762
|
### createAbilityInjector
|
|
1696
1763
|
|
|
1697
1764
|
▸ **createAbilityInjector**(`abilityClass`, `isGetClassFunc?`, `injectorOpts?`): `AbilityFn`
|
|
@@ -1813,7 +1880,7 @@ const transformer = createCallbacksTransformer(callbacks);
|
|
|
1813
1880
|
|
|
1814
1881
|
#### Defined in
|
|
1815
1882
|
|
|
1816
|
-
[packages/ai-tool/src/utils/stream/create-callbacks-stream.ts:36](https://github.com/isdk/ai-tool.js/blob/
|
|
1883
|
+
[packages/ai-tool/src/utils/stream/create-callbacks-stream.ts:36](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/stream/create-callbacks-stream.ts#L36)
|
|
1817
1884
|
|
|
1818
1885
|
___
|
|
1819
1886
|
|
|
@@ -1833,7 +1900,7 @@ An empty and closed ReadableStream instance.
|
|
|
1833
1900
|
|
|
1834
1901
|
#### Defined in
|
|
1835
1902
|
|
|
1836
|
-
[packages/ai-tool/src/utils/stream/create-empty-stream.ts:8](https://github.com/isdk/ai-tool.js/blob/
|
|
1903
|
+
[packages/ai-tool/src/utils/stream/create-empty-stream.ts:8](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/stream/create-empty-stream.ts#L8)
|
|
1837
1904
|
|
|
1838
1905
|
___
|
|
1839
1906
|
|
|
@@ -1865,7 +1932,7 @@ ___
|
|
|
1865
1932
|
|
|
1866
1933
|
#### Defined in
|
|
1867
1934
|
|
|
1868
|
-
[packages/ai-tool/src/utils/end-with-repeated-sequence.ts:3](https://github.com/isdk/ai-tool.js/blob/
|
|
1935
|
+
[packages/ai-tool/src/utils/end-with-repeated-sequence.ts:3](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/end-with-repeated-sequence.ts#L3)
|
|
1869
1936
|
|
|
1870
1937
|
___
|
|
1871
1938
|
|
|
@@ -1891,7 +1958,7 @@ Error object
|
|
|
1891
1958
|
|
|
1892
1959
|
#### Defined in
|
|
1893
1960
|
|
|
1894
|
-
[packages/ai-tool/src/utils/base-error.ts:220](https://github.com/isdk/ai-tool.js/blob/
|
|
1961
|
+
[packages/ai-tool/src/utils/base-error.ts:220](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/base-error.ts#L220)
|
|
1895
1962
|
|
|
1896
1963
|
___
|
|
1897
1964
|
|
|
@@ -1922,7 +1989,7 @@ TransformStream parsing events.
|
|
|
1922
1989
|
|
|
1923
1990
|
#### Defined in
|
|
1924
1991
|
|
|
1925
|
-
[packages/ai-tool/src/utils/stream/ai-stream.ts:37](https://github.com/isdk/ai-tool.js/blob/
|
|
1992
|
+
[packages/ai-tool/src/utils/stream/ai-stream.ts:37](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/stream/ai-stream.ts#L37)
|
|
1926
1993
|
|
|
1927
1994
|
___
|
|
1928
1995
|
|
|
@@ -1954,7 +2021,7 @@ ___
|
|
|
1954
2021
|
|
|
1955
2022
|
#### Defined in
|
|
1956
2023
|
|
|
1957
|
-
[packages/ai-tool/src/utils/prompt/hf-prompt-template.ts:
|
|
2024
|
+
[packages/ai-tool/src/utils/prompt/hf-prompt-template.ts:140](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/prompt/hf-prompt-template.ts#L140)
|
|
1958
2025
|
|
|
1959
2026
|
___
|
|
1960
2027
|
|
|
@@ -1975,7 +2042,7 @@ ___
|
|
|
1975
2042
|
|
|
1976
2043
|
#### Defined in
|
|
1977
2044
|
|
|
1978
|
-
[packages/ai-tool/src/funcs/lrucache.ts:22](https://github.com/isdk/ai-tool.js/blob/
|
|
2045
|
+
[packages/ai-tool/src/funcs/lrucache.ts:22](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/funcs/lrucache.ts#L22)
|
|
1979
2046
|
|
|
1980
2047
|
___
|
|
1981
2048
|
|
|
@@ -1996,7 +2063,7 @@ ___
|
|
|
1996
2063
|
|
|
1997
2064
|
#### Defined in
|
|
1998
2065
|
|
|
1999
|
-
[packages/ai-tool/src/utils/to-datetime.ts:29](https://github.com/isdk/ai-tool.js/blob/
|
|
2066
|
+
[packages/ai-tool/src/utils/to-datetime.ts:29](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/to-datetime.ts#L29)
|
|
2000
2067
|
|
|
2001
2068
|
___
|
|
2002
2069
|
|
|
@@ -2035,7 +2102,7 @@ console.log(process.env.HELLO) // undefined
|
|
|
2035
2102
|
|
|
2036
2103
|
#### Defined in
|
|
2037
2104
|
|
|
2038
|
-
[packages/ai-tool/src/utils/prompt/template/env.ts:82](https://github.com/isdk/ai-tool.js/blob/
|
|
2105
|
+
[packages/ai-tool/src/utils/prompt/template/env.ts:82](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/prompt/template/env.ts#L82)
|
|
2039
2106
|
|
|
2040
2107
|
___
|
|
2041
2108
|
|
|
@@ -2079,7 +2146,7 @@ const expandedObj = expandObjEnv(obj, { processEnv: myCustomEnv }); // Assuming
|
|
|
2079
2146
|
|
|
2080
2147
|
#### Defined in
|
|
2081
2148
|
|
|
2082
|
-
[packages/ai-tool/src/utils/prompt/template/env.ts:142](https://github.com/isdk/ai-tool.js/blob/
|
|
2149
|
+
[packages/ai-tool/src/utils/prompt/template/env.ts:142](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/prompt/template/env.ts#L142)
|
|
2083
2150
|
|
|
2084
2151
|
___
|
|
2085
2152
|
|
|
@@ -2119,7 +2186,38 @@ extNameLevel(".json5");
|
|
|
2119
2186
|
|
|
2120
2187
|
#### Defined in
|
|
2121
2188
|
|
|
2122
|
-
[packages/ai-tool/src/utils/filename.ts:209](https://github.com/isdk/ai-tool.js/blob/
|
|
2189
|
+
[packages/ai-tool/src/utils/filename.ts:209](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/filename.ts#L209)
|
|
2190
|
+
|
|
2191
|
+
___
|
|
2192
|
+
|
|
2193
|
+
### fileIsExists
|
|
2194
|
+
|
|
2195
|
+
▸ **fileIsExists**(`filepath`): `undefined` \| `boolean`
|
|
2196
|
+
|
|
2197
|
+
Checks if a file (not a directory) exists at the specified path.
|
|
2198
|
+
|
|
2199
|
+
#### Parameters
|
|
2200
|
+
|
|
2201
|
+
| Name | Type | Description |
|
|
2202
|
+
| :------ | :------ | :------ |
|
|
2203
|
+
| `filepath` | `string` | The path to the file to check. |
|
|
2204
|
+
|
|
2205
|
+
#### Returns
|
|
2206
|
+
|
|
2207
|
+
`undefined` \| `boolean`
|
|
2208
|
+
|
|
2209
|
+
true if the file exists and is not a directory; otherwise, false.
|
|
2210
|
+
|
|
2211
|
+
**`Example`**
|
|
2212
|
+
|
|
2213
|
+
```typescript
|
|
2214
|
+
const exists = fileIsExists('path/to/file.txt');
|
|
2215
|
+
console.log(exists); // Outputs: true or false
|
|
2216
|
+
```
|
|
2217
|
+
|
|
2218
|
+
#### Defined in
|
|
2219
|
+
|
|
2220
|
+
[packages/ai-tool/src/utils/load-file-from-paths.ts:18](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/load-file-from-paths.ts#L18)
|
|
2123
2221
|
|
|
2124
2222
|
___
|
|
2125
2223
|
|
|
@@ -2138,7 +2236,27 @@ A compiled regular expression for reserved filename characters.
|
|
|
2138
2236
|
|
|
2139
2237
|
#### Defined in
|
|
2140
2238
|
|
|
2141
|
-
[packages/ai-tool/src/utils/filename.ts:42](https://github.com/isdk/ai-tool.js/blob/
|
|
2239
|
+
[packages/ai-tool/src/utils/filename.ts:42](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/filename.ts#L42)
|
|
2240
|
+
|
|
2241
|
+
___
|
|
2242
|
+
|
|
2243
|
+
### filterValidFnScope
|
|
2244
|
+
|
|
2245
|
+
▸ **filterValidFnScope**(`scope?`): `undefined` \| `Record`\<`string`, `any`\>
|
|
2246
|
+
|
|
2247
|
+
#### Parameters
|
|
2248
|
+
|
|
2249
|
+
| Name | Type |
|
|
2250
|
+
| :------ | :------ |
|
|
2251
|
+
| `scope?` | `Record`\<`string`, `any`\> |
|
|
2252
|
+
|
|
2253
|
+
#### Returns
|
|
2254
|
+
|
|
2255
|
+
`undefined` \| `Record`\<`string`, `any`\>
|
|
2256
|
+
|
|
2257
|
+
#### Defined in
|
|
2258
|
+
|
|
2259
|
+
[packages/ai-tool/src/utils/parse-js-json.ts:33](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/parse-js-json.ts#L33)
|
|
2142
2260
|
|
|
2143
2261
|
___
|
|
2144
2262
|
|
|
@@ -2168,7 +2286,7 @@ An array containing all string keys of the specified enumeration.
|
|
|
2168
2286
|
|
|
2169
2287
|
#### Defined in
|
|
2170
2288
|
|
|
2171
|
-
[packages/ai-tool/src/utils/get-all-enum-keys.ts:7](https://github.com/isdk/ai-tool.js/blob/
|
|
2289
|
+
[packages/ai-tool/src/utils/get-all-enum-keys.ts:7](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/get-all-enum-keys.ts#L7)
|
|
2172
2290
|
|
|
2173
2291
|
___
|
|
2174
2292
|
|
|
@@ -2189,7 +2307,7 @@ ___
|
|
|
2189
2307
|
|
|
2190
2308
|
#### Defined in
|
|
2191
2309
|
|
|
2192
|
-
[packages/ai-tool/src/utils/config.ts:56](https://github.com/isdk/ai-tool.js/blob/
|
|
2310
|
+
[packages/ai-tool/src/utils/config.ts:56](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/config.ts#L56)
|
|
2193
2311
|
|
|
2194
2312
|
___
|
|
2195
2313
|
|
|
@@ -2210,7 +2328,7 @@ ___
|
|
|
2210
2328
|
|
|
2211
2329
|
#### Defined in
|
|
2212
2330
|
|
|
2213
|
-
[packages/ai-tool/src/utils/config.ts:80](https://github.com/isdk/ai-tool.js/blob/
|
|
2331
|
+
[packages/ai-tool/src/utils/config.ts:80](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/config.ts#L80)
|
|
2214
2332
|
|
|
2215
2333
|
___
|
|
2216
2334
|
|
|
@@ -2247,7 +2365,7 @@ console.log(getKeysPath(obj)); // Output: ['a.b.c', 'd[0]', 'd[1].e']
|
|
|
2247
2365
|
|
|
2248
2366
|
#### Defined in
|
|
2249
2367
|
|
|
2250
|
-
[packages/ai-tool/src/utils/get-keys-path.ts:16](https://github.com/isdk/ai-tool.js/blob/
|
|
2368
|
+
[packages/ai-tool/src/utils/get-keys-path.ts:16](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/get-keys-path.ts#L16)
|
|
2251
2369
|
|
|
2252
2370
|
___
|
|
2253
2371
|
|
|
@@ -2272,7 +2390,7 @@ Returns a concatenated string of multiple extensions, or an empty string if no e
|
|
|
2272
2390
|
|
|
2273
2391
|
#### Defined in
|
|
2274
2392
|
|
|
2275
|
-
[packages/ai-tool/src/utils/filename.ts:174](https://github.com/isdk/ai-tool.js/blob/
|
|
2393
|
+
[packages/ai-tool/src/utils/filename.ts:174](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/filename.ts#L174)
|
|
2276
2394
|
|
|
2277
2395
|
___
|
|
2278
2396
|
|
|
@@ -2303,7 +2421,7 @@ console.log(realPath); // Outputs the resolved path.
|
|
|
2303
2421
|
|
|
2304
2422
|
#### Defined in
|
|
2305
2423
|
|
|
2306
|
-
[packages/ai-tool/src/utils/load-file-from-paths.ts:
|
|
2424
|
+
[packages/ai-tool/src/utils/load-file-from-paths.ts:165](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/load-file-from-paths.ts#L165)
|
|
2307
2425
|
|
|
2308
2426
|
___
|
|
2309
2427
|
|
|
@@ -2323,7 +2441,7 @@ ___
|
|
|
2323
2441
|
|
|
2324
2442
|
#### Defined in
|
|
2325
2443
|
|
|
2326
|
-
[packages/ai-tool/src/utils/stream/error-readable-stream.ts:12](https://github.com/isdk/ai-tool.js/blob/
|
|
2444
|
+
[packages/ai-tool/src/utils/stream/error-readable-stream.ts:12](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/stream/error-readable-stream.ts#L12)
|
|
2327
2445
|
|
|
2328
2446
|
___
|
|
2329
2447
|
|
|
@@ -2346,7 +2464,7 @@ Operator precedence can be found here: https://developer.mozilla.org/en-US/docs/
|
|
|
2346
2464
|
|
|
2347
2465
|
#### Defined in
|
|
2348
2466
|
|
|
2349
|
-
[packages/ai-tool/src/utils/prompt/template/jinja/src/parser.ts:32](https://github.com/isdk/ai-tool.js/blob/
|
|
2467
|
+
[packages/ai-tool/src/utils/prompt/template/jinja/src/parser.ts:32](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/prompt/template/jinja/src/parser.ts#L32)
|
|
2350
2468
|
|
|
2351
2469
|
___
|
|
2352
2470
|
|
|
@@ -2369,7 +2487,7 @@ Generate a list of tokens from a source string.
|
|
|
2369
2487
|
|
|
2370
2488
|
#### Defined in
|
|
2371
2489
|
|
|
2372
|
-
[packages/ai-tool/src/utils/prompt/template/jinja/src/lexer.ts:200](https://github.com/isdk/ai-tool.js/blob/
|
|
2490
|
+
[packages/ai-tool/src/utils/prompt/template/jinja/src/lexer.ts:200](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/prompt/template/jinja/src/lexer.ts#L200)
|
|
2373
2491
|
|
|
2374
2492
|
___
|
|
2375
2493
|
|
|
@@ -2391,7 +2509,7 @@ ___
|
|
|
2391
2509
|
|
|
2392
2510
|
#### Defined in
|
|
2393
2511
|
|
|
2394
|
-
[packages/ai-tool/src/utils/prompt/template/env.ts:17](https://github.com/isdk/ai-tool.js/blob/
|
|
2512
|
+
[packages/ai-tool/src/utils/prompt/template/env.ts:17](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/prompt/template/env.ts#L17)
|
|
2395
2513
|
|
|
2396
2514
|
___
|
|
2397
2515
|
|
|
@@ -2416,7 +2534,7 @@ template have been replaced with their corresponding values.
|
|
|
2416
2534
|
|
|
2417
2535
|
#### Defined in
|
|
2418
2536
|
|
|
2419
|
-
[packages/ai-tool/src/utils/prompt/template/python.ts:71](https://github.com/isdk/ai-tool.js/blob/
|
|
2537
|
+
[packages/ai-tool/src/utils/prompt/template/python.ts:71](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/prompt/template/python.ts#L71)
|
|
2420
2538
|
|
|
2421
2539
|
___
|
|
2422
2540
|
|
|
@@ -2440,7 +2558,7 @@ Parse and interpolate template
|
|
|
2440
2558
|
|
|
2441
2559
|
#### Defined in
|
|
2442
2560
|
|
|
2443
|
-
[packages/ai-tool/src/utils/prompt/template/golang.ts:269](https://github.com/isdk/ai-tool.js/blob/
|
|
2561
|
+
[packages/ai-tool/src/utils/prompt/template/golang.ts:269](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/prompt/template/golang.ts#L269)
|
|
2444
2562
|
|
|
2445
2563
|
___
|
|
2446
2564
|
|
|
@@ -2479,7 +2597,7 @@ IsModelNameMatched("gpt-2", (modelName) => modelName.startsWith("gpt-")) // retu
|
|
|
2479
2597
|
|
|
2480
2598
|
#### Defined in
|
|
2481
2599
|
|
|
2482
|
-
[packages/ai-tool/src/utils/is-model-name-matched.ts:21](https://github.com/isdk/ai-tool.js/blob/
|
|
2600
|
+
[packages/ai-tool/src/utils/is-model-name-matched.ts:21](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/is-model-name-matched.ts#L21)
|
|
2483
2601
|
|
|
2484
2602
|
___
|
|
2485
2603
|
|
|
@@ -2514,7 +2632,7 @@ isValidFilename('my<file.txt'); // Returns false
|
|
|
2514
2632
|
|
|
2515
2633
|
#### Defined in
|
|
2516
2634
|
|
|
2517
|
-
[packages/ai-tool/src/utils/filename.ts:63](https://github.com/isdk/ai-tool.js/blob/
|
|
2635
|
+
[packages/ai-tool/src/utils/filename.ts:63](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/filename.ts#L63)
|
|
2518
2636
|
|
|
2519
2637
|
___
|
|
2520
2638
|
|
|
@@ -2538,7 +2656,7 @@ A boolean indicating whether the filepath is valid. Returns true if valid; false
|
|
|
2538
2656
|
|
|
2539
2657
|
#### Defined in
|
|
2540
2658
|
|
|
2541
|
-
[packages/ai-tool/src/utils/filename.ts:72](https://github.com/isdk/ai-tool.js/blob/
|
|
2659
|
+
[packages/ai-tool/src/utils/filename.ts:72](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/filename.ts#L72)
|
|
2542
2660
|
|
|
2543
2661
|
___
|
|
2544
2662
|
|
|
@@ -2558,7 +2676,7 @@ ___
|
|
|
2558
2676
|
|
|
2559
2677
|
#### Defined in
|
|
2560
2678
|
|
|
2561
|
-
[packages/ai-tool/src/utils/stream/is-web-stream.ts:1](https://github.com/isdk/ai-tool.js/blob/
|
|
2679
|
+
[packages/ai-tool/src/utils/stream/is-web-stream.ts:1](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/stream/is-web-stream.ts#L1)
|
|
2562
2680
|
|
|
2563
2681
|
___
|
|
2564
2682
|
|
|
@@ -2599,7 +2717,7 @@ console.log(jsonFilterToWhere(jsonFilter)); // Outputs a WHERE clause based on t
|
|
|
2599
2717
|
|
|
2600
2718
|
#### Defined in
|
|
2601
2719
|
|
|
2602
|
-
[packages/ai-tool/src/utils/json-filter.ts:123](https://github.com/isdk/ai-tool.js/blob/
|
|
2720
|
+
[packages/ai-tool/src/utils/json-filter.ts:123](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/json-filter.ts#L123)
|
|
2603
2721
|
|
|
2604
2722
|
___
|
|
2605
2723
|
|
|
@@ -2624,7 +2742,7 @@ ___
|
|
|
2624
2742
|
|
|
2625
2743
|
#### Defined in
|
|
2626
2744
|
|
|
2627
|
-
[packages/ai-tool/src/utils/json-to-markdown-str.ts:2](https://github.com/isdk/ai-tool.js/blob/
|
|
2745
|
+
[packages/ai-tool/src/utils/json-to-markdown-str.ts:2](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/json-to-markdown-str.ts#L2)
|
|
2628
2746
|
|
|
2629
2747
|
___
|
|
2630
2748
|
|
|
@@ -2664,7 +2782,7 @@ const content = loadFileFromPaths('config', ['/etc', '/usr/local/etc'], ['.json'
|
|
|
2664
2782
|
|
|
2665
2783
|
#### Defined in
|
|
2666
2784
|
|
|
2667
|
-
[packages/ai-tool/src/utils/load-file-from-paths.ts:
|
|
2785
|
+
[packages/ai-tool/src/utils/load-file-from-paths.ts:39](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/load-file-from-paths.ts#L39)
|
|
2668
2786
|
|
|
2669
2787
|
___
|
|
2670
2788
|
|
|
@@ -2688,7 +2806,7 @@ ___
|
|
|
2688
2806
|
|
|
2689
2807
|
#### Defined in
|
|
2690
2808
|
|
|
2691
|
-
[packages/ai-tool/src/utils/load-file-from-paths.ts:
|
|
2809
|
+
[packages/ai-tool/src/utils/load-file-from-paths.ts:96](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/load-file-from-paths.ts#L96)
|
|
2692
2810
|
|
|
2693
2811
|
___
|
|
2694
2812
|
|
|
@@ -2709,7 +2827,7 @@ typeof [`ToolFunc`](classes/ToolFunc.md)
|
|
|
2709
2827
|
|
|
2710
2828
|
#### Defined in
|
|
2711
2829
|
|
|
2712
|
-
[packages/ai-tool/src/utils/cancelable-ability.ts:340](https://github.com/isdk/ai-tool.js/blob/
|
|
2830
|
+
[packages/ai-tool/src/utils/cancelable-ability.ts:340](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/cancelable-ability.ts#L340)
|
|
2713
2831
|
|
|
2714
2832
|
___
|
|
2715
2833
|
|
|
@@ -2758,7 +2876,7 @@ matchUrlProtocol("noProtocolHere");
|
|
|
2758
2876
|
|
|
2759
2877
|
#### Defined in
|
|
2760
2878
|
|
|
2761
|
-
[packages/ai-tool/src/utils/match-url-protocol.ts:23](https://github.com/isdk/ai-tool.js/blob/
|
|
2879
|
+
[packages/ai-tool/src/utils/match-url-protocol.ts:23](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/match-url-protocol.ts#L23)
|
|
2762
2880
|
|
|
2763
2881
|
___
|
|
2764
2882
|
|
|
@@ -2778,7 +2896,7 @@ ___
|
|
|
2778
2896
|
|
|
2779
2897
|
#### Defined in
|
|
2780
2898
|
|
|
2781
|
-
[packages/ai-tool/src/utils/chat.ts:116](https://github.com/isdk/ai-tool.js/blob/
|
|
2899
|
+
[packages/ai-tool/src/utils/chat.ts:116](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/chat.ts#L116)
|
|
2782
2900
|
|
|
2783
2901
|
___
|
|
2784
2902
|
|
|
@@ -2804,7 +2922,31 @@ A string representing the formatted parameter size with the appropriate scale un
|
|
|
2804
2922
|
|
|
2805
2923
|
#### Defined in
|
|
2806
2924
|
|
|
2807
|
-
[packages/ai-tool/src/utils/convert-params-size.ts:11](https://github.com/isdk/ai-tool.js/blob/
|
|
2925
|
+
[packages/ai-tool/src/utils/convert-params-size.ts:11](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/convert-params-size.ts#L11)
|
|
2926
|
+
|
|
2927
|
+
___
|
|
2928
|
+
|
|
2929
|
+
### parseCommand
|
|
2930
|
+
|
|
2931
|
+
▸ **parseCommand**(`commandStr`, `scope?`, `options?`): `Promise`\<\{ `args?`: `Record`\<`string`, `any`\> ; `command`: `string` }\>
|
|
2932
|
+
|
|
2933
|
+
#### Parameters
|
|
2934
|
+
|
|
2935
|
+
| Name | Type |
|
|
2936
|
+
| :------ | :------ |
|
|
2937
|
+
| `commandStr` | `string` |
|
|
2938
|
+
| `scope?` | `Record`\<`string`, `any`\> |
|
|
2939
|
+
| `options?` | `Object` |
|
|
2940
|
+
| `options.argProcessor?` | `ArgProcessor` |
|
|
2941
|
+
| `options.delimiter?` | `string` |
|
|
2942
|
+
|
|
2943
|
+
#### Returns
|
|
2944
|
+
|
|
2945
|
+
`Promise`\<\{ `args?`: `Record`\<`string`, `any`\> ; `command`: `string` }\>
|
|
2946
|
+
|
|
2947
|
+
#### Defined in
|
|
2948
|
+
|
|
2949
|
+
[packages/ai-tool/src/utils/parse-command.ts:341](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/parse-command.ts#L341)
|
|
2808
2950
|
|
|
2809
2951
|
___
|
|
2810
2952
|
|
|
@@ -2829,7 +2971,7 @@ extract from langchain.js/langchain-core/src/prompts/template.ts
|
|
|
2829
2971
|
|
|
2830
2972
|
#### Defined in
|
|
2831
2973
|
|
|
2832
|
-
[packages/ai-tool/src/utils/prompt/template/python.ts:16](https://github.com/isdk/ai-tool.js/blob/
|
|
2974
|
+
[packages/ai-tool/src/utils/prompt/template/python.ts:16](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/prompt/template/python.ts#L16)
|
|
2833
2975
|
|
|
2834
2976
|
___
|
|
2835
2977
|
|
|
@@ -2863,7 +3005,150 @@ console.log(json); // { name: 'John' }
|
|
|
2863
3005
|
|
|
2864
3006
|
#### Defined in
|
|
2865
3007
|
|
|
2866
|
-
[packages/ai-tool/src/utils/parse-js-json.ts:
|
|
3008
|
+
[packages/ai-tool/src/utils/parse-js-json.ts:15](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/parse-js-json.ts#L15)
|
|
3009
|
+
|
|
3010
|
+
___
|
|
3011
|
+
|
|
3012
|
+
### parseObjectArgInfo
|
|
3013
|
+
|
|
3014
|
+
▸ **parseObjectArgInfo**(`argInfo`, `ix`, `scope?`, `argProcessor?`): `Promise`\<`string`\>
|
|
3015
|
+
|
|
3016
|
+
#### Parameters
|
|
3017
|
+
|
|
3018
|
+
| Name | Type |
|
|
3019
|
+
| :------ | :------ |
|
|
3020
|
+
| `argInfo` | `ArgInfo` |
|
|
3021
|
+
| `ix` | `number` |
|
|
3022
|
+
| `scope?` | `Record`\<`string`, `any`\> |
|
|
3023
|
+
| `argProcessor?` | `ArgProcessor` |
|
|
3024
|
+
|
|
3025
|
+
#### Returns
|
|
3026
|
+
|
|
3027
|
+
`Promise`\<`string`\>
|
|
3028
|
+
|
|
3029
|
+
#### Defined in
|
|
3030
|
+
|
|
3031
|
+
[packages/ai-tool/src/utils/parse-command.ts:193](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/parse-command.ts#L193)
|
|
3032
|
+
|
|
3033
|
+
___
|
|
3034
|
+
|
|
3035
|
+
### parseObjectArgumentInfos
|
|
3036
|
+
|
|
3037
|
+
▸ **parseObjectArgumentInfos**(`args`, `scope?`, `options?`): `Promise`\<`any`\>
|
|
3038
|
+
|
|
3039
|
+
#### Parameters
|
|
3040
|
+
|
|
3041
|
+
| Name | Type |
|
|
3042
|
+
| :------ | :------ |
|
|
3043
|
+
| `args` | `ArgInfo`[] |
|
|
3044
|
+
| `scope?` | `Record`\<`string`, `any`\> |
|
|
3045
|
+
| `options?` | `Object` |
|
|
3046
|
+
| `options.argProcessor?` | `ArgProcessor` |
|
|
3047
|
+
| `options.delimiter?` | `string` |
|
|
3048
|
+
| `options.returnArrayOnly?` | `boolean` |
|
|
3049
|
+
|
|
3050
|
+
#### Returns
|
|
3051
|
+
|
|
3052
|
+
`Promise`\<`any`\>
|
|
3053
|
+
|
|
3054
|
+
#### Defined in
|
|
3055
|
+
|
|
3056
|
+
[packages/ai-tool/src/utils/parse-command.ts:63](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/parse-command.ts#L63)
|
|
3057
|
+
|
|
3058
|
+
___
|
|
3059
|
+
|
|
3060
|
+
### parseObjectArguments
|
|
3061
|
+
|
|
3062
|
+
▸ **parseObjectArguments**(`argsStr`, `scope?`, `options?`): `Promise`\<`any`\>
|
|
3063
|
+
|
|
3064
|
+
Asynchronously parses a string of object arguments into an actual object.
|
|
3065
|
+
|
|
3066
|
+
#### Parameters
|
|
3067
|
+
|
|
3068
|
+
| Name | Type | Description |
|
|
3069
|
+
| :------ | :------ | :------ |
|
|
3070
|
+
| `argsStr` | `string` | The string of arguments to be parsed. |
|
|
3071
|
+
| `scope?` | `Record`\<`string`, `any`\> | An optional scope object that provides values for variables during parsing. |
|
|
3072
|
+
| `options?` | `Object` | An optional configuration object containing the delimiter and argument processor. |
|
|
3073
|
+
| `options.argProcessor?` | `ArgProcessor` | - |
|
|
3074
|
+
| `options.delimiter?` | `string` | - |
|
|
3075
|
+
| `options.returnArrayOnly?` | `boolean` | - |
|
|
3076
|
+
|
|
3077
|
+
#### Returns
|
|
3078
|
+
|
|
3079
|
+
`Promise`\<`any`\>
|
|
3080
|
+
|
|
3081
|
+
The parsed object or undefined.
|
|
3082
|
+
|
|
3083
|
+
This function first parses the argument string into an object string and then converts it
|
|
3084
|
+
into a proper JavaScript/JSON object based on the parsing results and configuration options.
|
|
3085
|
+
It handles the conversion of single objects, arrays, and key-value pairs. The default delimiter
|
|
3086
|
+
between parameters is a comma (`,`), but this can be customized using the `options.delimiter`.
|
|
3087
|
+
Parameter assignment always uses an equal sign (`=`) and cannot be modified.
|
|
3088
|
+
|
|
3089
|
+
The function returns:
|
|
3090
|
+
- An object if the input string represents a set of key-value pairs.
|
|
3091
|
+
- An array if the input string represents a sequence of elements, where each element can be
|
|
3092
|
+
parsed as a number (indices are used as keys).
|
|
3093
|
+
- A single value if the input string represents a single value or a single key-value pair.
|
|
3094
|
+
- `undefined` if the input string is empty or cannot be parsed into a valid object.
|
|
3095
|
+
|
|
3096
|
+
**`Example`**
|
|
3097
|
+
|
|
3098
|
+
```typescript
|
|
3099
|
+
// Example call with default delimiter
|
|
3100
|
+
const result = await parseObjectArguments("name=John,age=30");
|
|
3101
|
+
console.log(result); // Output: { name: 'John', age: '30' }
|
|
3102
|
+
|
|
3103
|
+
// Example call with custom delimiter
|
|
3104
|
+
const resultCustomDelimiter = await parseObjectArguments("name=John|age=30", undefined, { delimiter: '|' });
|
|
3105
|
+
console.log(resultCustomDelimiter); // Output: { name: 'John', age: '30' }
|
|
3106
|
+
|
|
3107
|
+
// Example with a single value
|
|
3108
|
+
const singleValue = await parseObjectArguments("42");
|
|
3109
|
+
console.log(singleValue); // Output: 42
|
|
3110
|
+
|
|
3111
|
+
// Example with an array
|
|
3112
|
+
const arrayResult = await parseObjectArguments("1,2,3");
|
|
3113
|
+
console.log(arrayResult); // Output: [1, 2, 3]
|
|
3114
|
+
```
|
|
3115
|
+
|
|
3116
|
+
#### Defined in
|
|
3117
|
+
|
|
3118
|
+
[packages/ai-tool/src/utils/parse-command.ts:58](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/parse-command.ts#L58)
|
|
3119
|
+
|
|
3120
|
+
___
|
|
3121
|
+
|
|
3122
|
+
### parseObjectArgumentsAsArgInfos
|
|
3123
|
+
|
|
3124
|
+
▸ **parseObjectArgumentsAsArgInfos**(`argsStr`, `scope?`, `options?`): `ArgInfo`[]
|
|
3125
|
+
|
|
3126
|
+
Parses an object arguments string into an array of ArgInfo.
|
|
3127
|
+
|
|
3128
|
+
This function processes a parameter string and parses it according to specific rules, allowing for custom delimiters.
|
|
3129
|
+
It can handle quotes, escape characters, and expressions within brackets. The parsing is designed to interpret
|
|
3130
|
+
object literal strings from dynamic languages, such as JSON objects or similar custom formats.
|
|
3131
|
+
|
|
3132
|
+
#### Parameters
|
|
3133
|
+
|
|
3134
|
+
| Name | Type | Description |
|
|
3135
|
+
| :------ | :------ | :------ |
|
|
3136
|
+
| `argsStr` | `string` | The string containing the arguments to be parsed. |
|
|
3137
|
+
| `scope?` | `Record`\<`string`, `any`\> | An optional scope object used for further processing of the parsed arguments. Default is undefined. |
|
|
3138
|
+
| `options?` | `Object` | Parsing options, including: - delimiter: The character used to separate arguments. Default is ','. - argProcessor: An optional instance of ArgProcessor used for further processing of the parsed arguments. |
|
|
3139
|
+
| `options.argProcessor?` | `ArgProcessor` | - |
|
|
3140
|
+
| `options.delimiter?` | `string` | - |
|
|
3141
|
+
|
|
3142
|
+
#### Returns
|
|
3143
|
+
|
|
3144
|
+
`ArgInfo`[]
|
|
3145
|
+
|
|
3146
|
+
An array of parsed argument information, where each item contains a boolean indicating whether the argument is named,
|
|
3147
|
+
and the string representation of the argument.
|
|
3148
|
+
|
|
3149
|
+
#### Defined in
|
|
3150
|
+
|
|
3151
|
+
[packages/ai-tool/src/utils/parse-command.ts:249](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/parse-command.ts#L249)
|
|
2867
3152
|
|
|
2868
3153
|
___
|
|
2869
3154
|
|
|
@@ -2883,7 +3168,27 @@ ___
|
|
|
2883
3168
|
|
|
2884
3169
|
#### Defined in
|
|
2885
3170
|
|
|
2886
|
-
[packages/ai-tool/src/utils/config.ts:25](https://github.com/isdk/ai-tool.js/blob/
|
|
3171
|
+
[packages/ai-tool/src/utils/config.ts:25](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/config.ts#L25)
|
|
3172
|
+
|
|
3173
|
+
___
|
|
3174
|
+
|
|
3175
|
+
### quoteStr
|
|
3176
|
+
|
|
3177
|
+
▸ **quoteStr**(`str`): `string`
|
|
3178
|
+
|
|
3179
|
+
#### Parameters
|
|
3180
|
+
|
|
3181
|
+
| Name | Type |
|
|
3182
|
+
| :------ | :------ |
|
|
3183
|
+
| `str` | `string` |
|
|
3184
|
+
|
|
3185
|
+
#### Returns
|
|
3186
|
+
|
|
3187
|
+
`string`
|
|
3188
|
+
|
|
3189
|
+
#### Defined in
|
|
3190
|
+
|
|
3191
|
+
[packages/ai-tool/src/utils/parse-command.ts:184](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/parse-command.ts#L184)
|
|
2887
3192
|
|
|
2888
3193
|
___
|
|
2889
3194
|
|
|
@@ -2901,7 +3206,7 @@ A compiled regular expression for control characters in a filename.
|
|
|
2901
3206
|
|
|
2902
3207
|
#### Defined in
|
|
2903
3208
|
|
|
2904
|
-
[packages/ai-tool/src/utils/filename.ts:50](https://github.com/isdk/ai-tool.js/blob/
|
|
3209
|
+
[packages/ai-tool/src/utils/filename.ts:50](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/filename.ts#L50)
|
|
2905
3210
|
|
|
2906
3211
|
___
|
|
2907
3212
|
|
|
@@ -2935,7 +3240,7 @@ console.log(files); // Outputs an array of JavaScript file paths.
|
|
|
2935
3240
|
|
|
2936
3241
|
#### Defined in
|
|
2937
3242
|
|
|
2938
|
-
[packages/ai-tool/src/utils/load-file-from-paths.ts:
|
|
3243
|
+
[packages/ai-tool/src/utils/load-file-from-paths.ts:122](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/load-file-from-paths.ts#L122)
|
|
2939
3244
|
|
|
2940
3245
|
___
|
|
2941
3246
|
|
|
@@ -2964,7 +3269,7 @@ https://github.com/whatwg/streams/commit/8d7a0bf26eb2cc23e884ddbaac7c1da4b91cf2b
|
|
|
2964
3269
|
|
|
2965
3270
|
#### Defined in
|
|
2966
3271
|
|
|
2967
|
-
[packages/ai-tool/src/utils/stream/ai-stream.ts:166](https://github.com/isdk/ai-tool.js/blob/
|
|
3272
|
+
[packages/ai-tool/src/utils/stream/ai-stream.ts:166](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/stream/ai-stream.ts#L166)
|
|
2968
3273
|
|
|
2969
3274
|
___
|
|
2970
3275
|
|
|
@@ -2978,7 +3283,7 @@ ___
|
|
|
2978
3283
|
|
|
2979
3284
|
#### Defined in
|
|
2980
3285
|
|
|
2981
|
-
[packages/ai-tool/src/funcs/index.ts:9](https://github.com/isdk/ai-tool.js/blob/
|
|
3286
|
+
[packages/ai-tool/src/funcs/index.ts:9](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/funcs/index.ts#L9)
|
|
2982
3287
|
|
|
2983
3288
|
___
|
|
2984
3289
|
|
|
@@ -2998,7 +3303,7 @@ ___
|
|
|
2998
3303
|
|
|
2999
3304
|
#### Defined in
|
|
3000
3305
|
|
|
3001
|
-
[packages/ai-tool/src/utils/config.ts:15](https://github.com/isdk/ai-tool.js/blob/
|
|
3306
|
+
[packages/ai-tool/src/utils/config.ts:15](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/config.ts#L15)
|
|
3002
3307
|
|
|
3003
3308
|
___
|
|
3004
3309
|
|
|
@@ -3027,7 +3332,7 @@ The sanitized filename.
|
|
|
3027
3332
|
|
|
3028
3333
|
#### Defined in
|
|
3029
3334
|
|
|
3030
|
-
[packages/ai-tool/src/utils/filename.ts:97](https://github.com/isdk/ai-tool.js/blob/
|
|
3335
|
+
[packages/ai-tool/src/utils/filename.ts:97](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/filename.ts#L97)
|
|
3031
3336
|
|
|
3032
3337
|
___
|
|
3033
3338
|
|
|
@@ -3052,7 +3357,7 @@ The sanitized file path as a string.
|
|
|
3052
3357
|
|
|
3053
3358
|
#### Defined in
|
|
3054
3359
|
|
|
3055
|
-
[packages/ai-tool/src/utils/filename.ts:149](https://github.com/isdk/ai-tool.js/blob/
|
|
3360
|
+
[packages/ai-tool/src/utils/filename.ts:149](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/filename.ts#L149)
|
|
3056
3361
|
|
|
3057
3362
|
___
|
|
3058
3363
|
|
|
@@ -3074,7 +3379,7 @@ ___
|
|
|
3074
3379
|
|
|
3075
3380
|
#### Defined in
|
|
3076
3381
|
|
|
3077
|
-
[packages/ai-tool/src/utils/config.ts:85](https://github.com/isdk/ai-tool.js/blob/
|
|
3382
|
+
[packages/ai-tool/src/utils/config.ts:85](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/config.ts#L85)
|
|
3078
3383
|
|
|
3079
3384
|
___
|
|
3080
3385
|
|
|
@@ -3098,7 +3403,7 @@ The parameter size in bytes.
|
|
|
3098
3403
|
|
|
3099
3404
|
#### Defined in
|
|
3100
3405
|
|
|
3101
|
-
[packages/ai-tool/src/utils/convert-params-size.ts:44](https://github.com/isdk/ai-tool.js/blob/
|
|
3406
|
+
[packages/ai-tool/src/utils/convert-params-size.ts:44](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/convert-params-size.ts#L44)
|
|
3102
3407
|
|
|
3103
3408
|
___
|
|
3104
3409
|
|
|
@@ -3124,7 +3429,7 @@ ___
|
|
|
3124
3429
|
|
|
3125
3430
|
#### Defined in
|
|
3126
3431
|
|
|
3127
|
-
[packages/ai-tool/src/utils/prompt/few-shot-prompt-template.ts:4](https://github.com/isdk/ai-tool.js/blob/
|
|
3432
|
+
[packages/ai-tool/src/utils/prompt/few-shot-prompt-template.ts:4](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/prompt/few-shot-prompt-template.ts#L4)
|
|
3128
3433
|
|
|
3129
3434
|
___
|
|
3130
3435
|
|
|
@@ -3154,7 +3459,7 @@ console.log(splitSentence(text)); // returns ['Hello world!', 'How are you toda
|
|
|
3154
3459
|
|
|
3155
3460
|
#### Defined in
|
|
3156
3461
|
|
|
3157
|
-
[packages/ai-tool/src/utils/split-sentence.ts:29](https://github.com/isdk/ai-tool.js/blob/
|
|
3462
|
+
[packages/ai-tool/src/utils/split-sentence.ts:29](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/split-sentence.ts#L29)
|
|
3158
3463
|
|
|
3159
3464
|
___
|
|
3160
3465
|
|
|
@@ -3218,7 +3523,7 @@ ___
|
|
|
3218
3523
|
|
|
3219
3524
|
#### Defined in
|
|
3220
3525
|
|
|
3221
|
-
[packages/ai-tool/src/utils/to-datetime.ts:25](https://github.com/isdk/ai-tool.js/blob/
|
|
3526
|
+
[packages/ai-tool/src/utils/to-datetime.ts:25](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/to-datetime.ts#L25)
|
|
3222
3527
|
|
|
3223
3528
|
___
|
|
3224
3529
|
|
|
@@ -3246,7 +3551,7 @@ Throws a BaseError object
|
|
|
3246
3551
|
|
|
3247
3552
|
#### Defined in
|
|
3248
3553
|
|
|
3249
|
-
[packages/ai-tool/src/utils/base-error.ts:235](https://github.com/isdk/ai-tool.js/blob/
|
|
3554
|
+
[packages/ai-tool/src/utils/base-error.ts:235](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/base-error.ts#L235)
|
|
3250
3555
|
|
|
3251
3556
|
___
|
|
3252
3557
|
|
|
@@ -3266,7 +3571,7 @@ ___
|
|
|
3266
3571
|
|
|
3267
3572
|
#### Defined in
|
|
3268
3573
|
|
|
3269
|
-
[packages/ai-tool/src/utils/to-datetime.ts:9](https://github.com/isdk/ai-tool.js/blob/
|
|
3574
|
+
[packages/ai-tool/src/utils/to-datetime.ts:9](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/to-datetime.ts#L9)
|
|
3270
3575
|
|
|
3271
3576
|
___
|
|
3272
3577
|
|
|
@@ -3308,7 +3613,7 @@ const output2 = trimStart(" text"); // " text"
|
|
|
3308
3613
|
|
|
3309
3614
|
#### Defined in
|
|
3310
3615
|
|
|
3311
|
-
[packages/ai-tool/src/utils/stream/ai-stream.ts:92](https://github.com/isdk/ai-tool.js/blob/
|
|
3616
|
+
[packages/ai-tool/src/utils/stream/ai-stream.ts:92](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/stream/ai-stream.ts#L92)
|
|
3312
3617
|
|
|
3313
3618
|
___
|
|
3314
3619
|
|
|
@@ -3348,7 +3653,7 @@ truncTo(1.2345, 2, 0.6)
|
|
|
3348
3653
|
|
|
3349
3654
|
#### Defined in
|
|
3350
3655
|
|
|
3351
|
-
[packages/ai-tool/src/utils/trunc-to.ts:19](https://github.com/isdk/ai-tool.js/blob/
|
|
3656
|
+
[packages/ai-tool/src/utils/trunc-to.ts:19](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/trunc-to.ts#L19)
|
|
3352
3657
|
|
|
3353
3658
|
___
|
|
3354
3659
|
|
|
@@ -3369,7 +3674,7 @@ ___
|
|
|
3369
3674
|
|
|
3370
3675
|
#### Defined in
|
|
3371
3676
|
|
|
3372
|
-
[packages/ai-tool/src/utils/hash/uuid.ts:8](https://github.com/isdk/ai-tool.js/blob/
|
|
3677
|
+
[packages/ai-tool/src/utils/hash/uuid.ts:8](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/hash/uuid.ts#L8)
|
|
3373
3678
|
|
|
3374
3679
|
___
|
|
3375
3680
|
|
|
@@ -3604,7 +3909,7 @@ ___
|
|
|
3604
3909
|
|
|
3605
3910
|
#### Defined in
|
|
3606
3911
|
|
|
3607
|
-
[packages/ai-tool/src/utils/wait.ts:1](https://github.com/isdk/ai-tool.js/blob/
|
|
3912
|
+
[packages/ai-tool/src/utils/wait.ts:1](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/wait.ts#L1)
|
|
3608
3913
|
|
|
3609
3914
|
___
|
|
3610
3915
|
|
|
@@ -3626,7 +3931,7 @@ ___
|
|
|
3626
3931
|
|
|
3627
3932
|
#### Defined in
|
|
3628
3933
|
|
|
3629
|
-
[packages/ai-tool/src/utils/hash/xxhash.ts:32](https://github.com/isdk/ai-tool.js/blob/
|
|
3934
|
+
[packages/ai-tool/src/utils/hash/xxhash.ts:32](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/hash/xxhash.ts#L32)
|
|
3630
3935
|
|
|
3631
3936
|
___
|
|
3632
3937
|
|
|
@@ -3647,7 +3952,7 @@ ___
|
|
|
3647
3952
|
|
|
3648
3953
|
#### Defined in
|
|
3649
3954
|
|
|
3650
|
-
[packages/ai-tool/src/utils/hash/xxhash.ts:11](https://github.com/isdk/ai-tool.js/blob/
|
|
3955
|
+
[packages/ai-tool/src/utils/hash/xxhash.ts:11](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/hash/xxhash.ts#L11)
|
|
3651
3956
|
|
|
3652
3957
|
___
|
|
3653
3958
|
|
|
@@ -3668,7 +3973,7 @@ ___
|
|
|
3668
3973
|
|
|
3669
3974
|
#### Defined in
|
|
3670
3975
|
|
|
3671
|
-
[packages/ai-tool/src/utils/hash/xxhash.ts:18](https://github.com/isdk/ai-tool.js/blob/
|
|
3976
|
+
[packages/ai-tool/src/utils/hash/xxhash.ts:18](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/hash/xxhash.ts#L18)
|
|
3672
3977
|
|
|
3673
3978
|
___
|
|
3674
3979
|
|
|
@@ -3690,4 +3995,4 @@ ___
|
|
|
3690
3995
|
|
|
3691
3996
|
#### Defined in
|
|
3692
3997
|
|
|
3693
|
-
[packages/ai-tool/src/utils/hash/xxhash.ts:48](https://github.com/isdk/ai-tool.js/blob/
|
|
3998
|
+
[packages/ai-tool/src/utils/hash/xxhash.ts:48](https://github.com/isdk/ai-tool.js/blob/bc1a97dabcb6599e292a0944fe49213fed45d128/src/utils/hash/xxhash.ts#L48)
|