@isdk/ai-tool 0.0.4 → 0.0.6
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-ZXBTGYVX.mjs → chunk-6AXCY6TJ.mjs} +40 -22
- package/dist/funcs.js +40 -22
- package/dist/funcs.mjs +1 -1
- package/dist/index.d.mts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +40 -22
- 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/ClientTools.md +51 -51
- package/docs/classes/CommonError.md +8 -8
- package/docs/classes/EventClient.md +73 -73
- package/docs/classes/EventServer.md +71 -71
- package/docs/classes/EventToolFunc.md +41 -41
- 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 +17 -17
- package/docs/classes/HFTemplate.md +4 -4
- package/docs/classes/HfPromptTemplate.md +18 -18
- 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 +57 -57
- package/docs/classes/ResServerTools.md +55 -55
- package/docs/classes/SSEChannel.md +15 -15
- package/docs/classes/ServerTools.md +48 -48
- package/docs/classes/ToolFunc.md +38 -38
- package/docs/enums/ErrorCode.md +19 -19
- 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/AIResult.md +4 -4
- package/docs/interfaces/AIStreamCallbacksAndOptions.md +6 -6
- package/docs/interfaces/AIStreamParser.md +1 -1
- package/docs/interfaces/AIStreamParserOptions.md +1 -1
- package/docs/interfaces/BaseFunc.md +7 -7
- package/docs/interfaces/BaseFuncItem.md +6 -6
- package/docs/interfaces/ClientFuncItem.md +10 -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 +7 -7
- package/docs/interfaces/FuncParam.md +5 -5
- package/docs/interfaces/PromptExampleSelectorOptions.md +2 -2
- package/docs/interfaces/PromptTemplateOptions.md +6 -6
- package/docs/interfaces/RemoteFuncItem.md +10 -10
- 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 +11 -11
- package/docs/interfaces/ServerFuncParams.md +2 -2
- package/docs/modules.md +119 -117
- package/package.json +2 -2
|
@@ -4175,45 +4175,63 @@ function createEndWithRepetitionDetector(repetitionThreshold) {
|
|
|
4175
4175
|
// src/utils/load-file-from-paths.ts
|
|
4176
4176
|
import path2 from "path";
|
|
4177
4177
|
import * as fs from "fs";
|
|
4178
|
-
function loadFileFromPaths(filename, searchPaths, extNames) {
|
|
4178
|
+
function loadFileFromPaths(filename, searchPaths, extNames, options) {
|
|
4179
4179
|
let result;
|
|
4180
4180
|
if (path2.isAbsolute(filename)) {
|
|
4181
4181
|
if (fs.existsSync(filename)) {
|
|
4182
4182
|
result = filename;
|
|
4183
|
+
} else {
|
|
4184
|
+
result = tryGetFilepath(path2.basename(filename), [path2.dirname(filename)], extNames);
|
|
4183
4185
|
}
|
|
4184
4186
|
} else {
|
|
4185
4187
|
if (!searchPaths) {
|
|
4186
4188
|
searchPaths = ["."];
|
|
4187
4189
|
}
|
|
4188
|
-
|
|
4189
|
-
for (const searchPath of searchPaths) {
|
|
4190
|
-
const filePath = path2.resolve(searchPath, filename);
|
|
4191
|
-
if (exts) {
|
|
4192
|
-
for (let i = 0; i < exts.length; i++) {
|
|
4193
|
-
const extName = exts[i] !== extNames[i] ? extNames[i] : "";
|
|
4194
|
-
const filenameWithExt = filePath + extName;
|
|
4195
|
-
if (fs.existsSync(filenameWithExt)) {
|
|
4196
|
-
result = filenameWithExt;
|
|
4197
|
-
break;
|
|
4198
|
-
}
|
|
4199
|
-
}
|
|
4200
|
-
} else {
|
|
4201
|
-
if (fs.existsSync(filePath)) {
|
|
4202
|
-
result = filePath;
|
|
4203
|
-
break;
|
|
4204
|
-
}
|
|
4205
|
-
}
|
|
4206
|
-
}
|
|
4190
|
+
result = tryGetFilepath(filename, searchPaths, extNames);
|
|
4207
4191
|
}
|
|
4208
4192
|
if (result) {
|
|
4193
|
+
const filepath = result;
|
|
4209
4194
|
result = fs.readFileSync(result);
|
|
4195
|
+
if (options) {
|
|
4196
|
+
options.filepath = filepath;
|
|
4197
|
+
}
|
|
4210
4198
|
} else {
|
|
4211
4199
|
throw new NotFoundError(filename, "loadFileFromPaths");
|
|
4212
4200
|
}
|
|
4213
4201
|
return result;
|
|
4214
4202
|
}
|
|
4215
|
-
function
|
|
4216
|
-
|
|
4203
|
+
function tryGetFilepath(filename, searchPaths, extNames) {
|
|
4204
|
+
let result;
|
|
4205
|
+
const exts = extNames ? extNames.map((ext) => getMultiLevelExtname(filename, extNameLevel(ext))) : void 0;
|
|
4206
|
+
for (const searchPath of searchPaths) {
|
|
4207
|
+
const filePath = path2.resolve(searchPath, filename);
|
|
4208
|
+
if (exts) {
|
|
4209
|
+
for (let i = 0; i < exts.length; i++) {
|
|
4210
|
+
const extName = exts[i] !== extNames[i] ? extNames[i] : "";
|
|
4211
|
+
const filenameWithExt = filePath + extName;
|
|
4212
|
+
if (fs.existsSync(filenameWithExt)) {
|
|
4213
|
+
result = filenameWithExt;
|
|
4214
|
+
break;
|
|
4215
|
+
}
|
|
4216
|
+
}
|
|
4217
|
+
} else {
|
|
4218
|
+
if (fs.existsSync(filePath)) {
|
|
4219
|
+
result = filePath;
|
|
4220
|
+
break;
|
|
4221
|
+
}
|
|
4222
|
+
}
|
|
4223
|
+
}
|
|
4224
|
+
return result;
|
|
4225
|
+
}
|
|
4226
|
+
function loadTextFromPaths(filename, searchPaths, extNames, options) {
|
|
4227
|
+
let encoding;
|
|
4228
|
+
if (typeof options === "string") {
|
|
4229
|
+
encoding = options;
|
|
4230
|
+
options = void 0;
|
|
4231
|
+
} else {
|
|
4232
|
+
encoding = options?.encoding ?? "utf8";
|
|
4233
|
+
}
|
|
4234
|
+
const result = loadFileFromPaths(filename, searchPaths, extNames, options);
|
|
4217
4235
|
return result.toString(encoding);
|
|
4218
4236
|
}
|
|
4219
4237
|
|
package/dist/funcs.js
CHANGED
|
@@ -4219,45 +4219,63 @@ function createEndWithRepetitionDetector(repetitionThreshold) {
|
|
|
4219
4219
|
// src/utils/load-file-from-paths.ts
|
|
4220
4220
|
var import_path2 = __toESM(require("path"));
|
|
4221
4221
|
var fs = __toESM(require("fs"));
|
|
4222
|
-
function loadFileFromPaths(filename, searchPaths, extNames) {
|
|
4222
|
+
function loadFileFromPaths(filename, searchPaths, extNames, options) {
|
|
4223
4223
|
let result;
|
|
4224
4224
|
if (import_path2.default.isAbsolute(filename)) {
|
|
4225
4225
|
if (fs.existsSync(filename)) {
|
|
4226
4226
|
result = filename;
|
|
4227
|
+
} else {
|
|
4228
|
+
result = tryGetFilepath(import_path2.default.basename(filename), [import_path2.default.dirname(filename)], extNames);
|
|
4227
4229
|
}
|
|
4228
4230
|
} else {
|
|
4229
4231
|
if (!searchPaths) {
|
|
4230
4232
|
searchPaths = ["."];
|
|
4231
4233
|
}
|
|
4232
|
-
|
|
4233
|
-
for (const searchPath of searchPaths) {
|
|
4234
|
-
const filePath = import_path2.default.resolve(searchPath, filename);
|
|
4235
|
-
if (exts) {
|
|
4236
|
-
for (let i = 0; i < exts.length; i++) {
|
|
4237
|
-
const extName = exts[i] !== extNames[i] ? extNames[i] : "";
|
|
4238
|
-
const filenameWithExt = filePath + extName;
|
|
4239
|
-
if (fs.existsSync(filenameWithExt)) {
|
|
4240
|
-
result = filenameWithExt;
|
|
4241
|
-
break;
|
|
4242
|
-
}
|
|
4243
|
-
}
|
|
4244
|
-
} else {
|
|
4245
|
-
if (fs.existsSync(filePath)) {
|
|
4246
|
-
result = filePath;
|
|
4247
|
-
break;
|
|
4248
|
-
}
|
|
4249
|
-
}
|
|
4250
|
-
}
|
|
4234
|
+
result = tryGetFilepath(filename, searchPaths, extNames);
|
|
4251
4235
|
}
|
|
4252
4236
|
if (result) {
|
|
4237
|
+
const filepath = result;
|
|
4253
4238
|
result = fs.readFileSync(result);
|
|
4239
|
+
if (options) {
|
|
4240
|
+
options.filepath = filepath;
|
|
4241
|
+
}
|
|
4254
4242
|
} else {
|
|
4255
4243
|
throw new NotFoundError(filename, "loadFileFromPaths");
|
|
4256
4244
|
}
|
|
4257
4245
|
return result;
|
|
4258
4246
|
}
|
|
4259
|
-
function
|
|
4260
|
-
|
|
4247
|
+
function tryGetFilepath(filename, searchPaths, extNames) {
|
|
4248
|
+
let result;
|
|
4249
|
+
const exts = extNames ? extNames.map((ext) => getMultiLevelExtname(filename, extNameLevel(ext))) : void 0;
|
|
4250
|
+
for (const searchPath of searchPaths) {
|
|
4251
|
+
const filePath = import_path2.default.resolve(searchPath, filename);
|
|
4252
|
+
if (exts) {
|
|
4253
|
+
for (let i = 0; i < exts.length; i++) {
|
|
4254
|
+
const extName = exts[i] !== extNames[i] ? extNames[i] : "";
|
|
4255
|
+
const filenameWithExt = filePath + extName;
|
|
4256
|
+
if (fs.existsSync(filenameWithExt)) {
|
|
4257
|
+
result = filenameWithExt;
|
|
4258
|
+
break;
|
|
4259
|
+
}
|
|
4260
|
+
}
|
|
4261
|
+
} else {
|
|
4262
|
+
if (fs.existsSync(filePath)) {
|
|
4263
|
+
result = filePath;
|
|
4264
|
+
break;
|
|
4265
|
+
}
|
|
4266
|
+
}
|
|
4267
|
+
}
|
|
4268
|
+
return result;
|
|
4269
|
+
}
|
|
4270
|
+
function loadTextFromPaths(filename, searchPaths, extNames, options) {
|
|
4271
|
+
let encoding;
|
|
4272
|
+
if (typeof options === "string") {
|
|
4273
|
+
encoding = options;
|
|
4274
|
+
options = void 0;
|
|
4275
|
+
} else {
|
|
4276
|
+
encoding = options?.encoding ?? "utf8";
|
|
4277
|
+
}
|
|
4278
|
+
const result = loadFileFromPaths(filename, searchPaths, extNames, options);
|
|
4261
4279
|
return result.toString(encoding);
|
|
4262
4280
|
}
|
|
4263
4281
|
|
package/dist/funcs.mjs
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1062,8 +1062,13 @@ declare function createEndWithRepetitionDetector(repetitionThreshold: number): (
|
|
|
1062
1062
|
* const content = loadFileFromPaths('config', ['/etc', '/usr/local/etc'], ['.json', '.yaml']);
|
|
1063
1063
|
* ```
|
|
1064
1064
|
*/
|
|
1065
|
-
declare function loadFileFromPaths(filename: string, searchPaths?: string[], extNames?: string[]
|
|
1066
|
-
|
|
1065
|
+
declare function loadFileFromPaths(filename: string, searchPaths?: string[], extNames?: string[], options?: {
|
|
1066
|
+
filepath?: string;
|
|
1067
|
+
}): Buffer;
|
|
1068
|
+
declare function loadTextFromPaths(filename: string, searchPaths?: string[], extNames?: string[], options?: {
|
|
1069
|
+
encoding?: BufferEncoding;
|
|
1070
|
+
filepath?: string;
|
|
1071
|
+
} | BufferEncoding): string;
|
|
1067
1072
|
|
|
1068
1073
|
declare function registerYamlTag(tags: any): void;
|
|
1069
1074
|
declare function parseYaml(content: string): any;
|
package/dist/index.d.ts
CHANGED
|
@@ -1062,8 +1062,13 @@ declare function createEndWithRepetitionDetector(repetitionThreshold: number): (
|
|
|
1062
1062
|
* const content = loadFileFromPaths('config', ['/etc', '/usr/local/etc'], ['.json', '.yaml']);
|
|
1063
1063
|
* ```
|
|
1064
1064
|
*/
|
|
1065
|
-
declare function loadFileFromPaths(filename: string, searchPaths?: string[], extNames?: string[]
|
|
1066
|
-
|
|
1065
|
+
declare function loadFileFromPaths(filename: string, searchPaths?: string[], extNames?: string[], options?: {
|
|
1066
|
+
filepath?: string;
|
|
1067
|
+
}): Buffer;
|
|
1068
|
+
declare function loadTextFromPaths(filename: string, searchPaths?: string[], extNames?: string[], options?: {
|
|
1069
|
+
encoding?: BufferEncoding;
|
|
1070
|
+
filepath?: string;
|
|
1071
|
+
} | BufferEncoding): string;
|
|
1067
1072
|
|
|
1068
1073
|
declare function registerYamlTag(tags: any): void;
|
|
1069
1074
|
declare function parseYaml(content: string): any;
|
package/dist/index.js
CHANGED
|
@@ -3767,45 +3767,63 @@ function createEndWithRepetitionDetector(repetitionThreshold) {
|
|
|
3767
3767
|
// src/utils/load-file-from-paths.ts
|
|
3768
3768
|
var import_path2 = __toESM(require("path"));
|
|
3769
3769
|
var fs = __toESM(require("fs"));
|
|
3770
|
-
function loadFileFromPaths(filename, searchPaths, extNames) {
|
|
3770
|
+
function loadFileFromPaths(filename, searchPaths, extNames, options) {
|
|
3771
3771
|
let result;
|
|
3772
3772
|
if (import_path2.default.isAbsolute(filename)) {
|
|
3773
3773
|
if (fs.existsSync(filename)) {
|
|
3774
3774
|
result = filename;
|
|
3775
|
+
} else {
|
|
3776
|
+
result = tryGetFilepath(import_path2.default.basename(filename), [import_path2.default.dirname(filename)], extNames);
|
|
3775
3777
|
}
|
|
3776
3778
|
} else {
|
|
3777
3779
|
if (!searchPaths) {
|
|
3778
3780
|
searchPaths = ["."];
|
|
3779
3781
|
}
|
|
3780
|
-
|
|
3781
|
-
for (const searchPath of searchPaths) {
|
|
3782
|
-
const filePath = import_path2.default.resolve(searchPath, filename);
|
|
3783
|
-
if (exts) {
|
|
3784
|
-
for (let i = 0; i < exts.length; i++) {
|
|
3785
|
-
const extName = exts[i] !== extNames[i] ? extNames[i] : "";
|
|
3786
|
-
const filenameWithExt = filePath + extName;
|
|
3787
|
-
if (fs.existsSync(filenameWithExt)) {
|
|
3788
|
-
result = filenameWithExt;
|
|
3789
|
-
break;
|
|
3790
|
-
}
|
|
3791
|
-
}
|
|
3792
|
-
} else {
|
|
3793
|
-
if (fs.existsSync(filePath)) {
|
|
3794
|
-
result = filePath;
|
|
3795
|
-
break;
|
|
3796
|
-
}
|
|
3797
|
-
}
|
|
3798
|
-
}
|
|
3782
|
+
result = tryGetFilepath(filename, searchPaths, extNames);
|
|
3799
3783
|
}
|
|
3800
3784
|
if (result) {
|
|
3785
|
+
const filepath = result;
|
|
3801
3786
|
result = fs.readFileSync(result);
|
|
3787
|
+
if (options) {
|
|
3788
|
+
options.filepath = filepath;
|
|
3789
|
+
}
|
|
3802
3790
|
} else {
|
|
3803
3791
|
throw new NotFoundError(filename, "loadFileFromPaths");
|
|
3804
3792
|
}
|
|
3805
3793
|
return result;
|
|
3806
3794
|
}
|
|
3807
|
-
function
|
|
3808
|
-
|
|
3795
|
+
function tryGetFilepath(filename, searchPaths, extNames) {
|
|
3796
|
+
let result;
|
|
3797
|
+
const exts = extNames ? extNames.map((ext) => getMultiLevelExtname(filename, extNameLevel(ext))) : void 0;
|
|
3798
|
+
for (const searchPath of searchPaths) {
|
|
3799
|
+
const filePath = import_path2.default.resolve(searchPath, filename);
|
|
3800
|
+
if (exts) {
|
|
3801
|
+
for (let i = 0; i < exts.length; i++) {
|
|
3802
|
+
const extName = exts[i] !== extNames[i] ? extNames[i] : "";
|
|
3803
|
+
const filenameWithExt = filePath + extName;
|
|
3804
|
+
if (fs.existsSync(filenameWithExt)) {
|
|
3805
|
+
result = filenameWithExt;
|
|
3806
|
+
break;
|
|
3807
|
+
}
|
|
3808
|
+
}
|
|
3809
|
+
} else {
|
|
3810
|
+
if (fs.existsSync(filePath)) {
|
|
3811
|
+
result = filePath;
|
|
3812
|
+
break;
|
|
3813
|
+
}
|
|
3814
|
+
}
|
|
3815
|
+
}
|
|
3816
|
+
return result;
|
|
3817
|
+
}
|
|
3818
|
+
function loadTextFromPaths(filename, searchPaths, extNames, options) {
|
|
3819
|
+
let encoding;
|
|
3820
|
+
if (typeof options === "string") {
|
|
3821
|
+
encoding = options;
|
|
3822
|
+
options = void 0;
|
|
3823
|
+
} else {
|
|
3824
|
+
encoding = options?.encoding ?? "utf8";
|
|
3825
|
+
}
|
|
3826
|
+
const result = loadFileFromPaths(filename, searchPaths, extNames, options);
|
|
3809
3827
|
return result.toString(encoding);
|
|
3810
3828
|
}
|
|
3811
3829
|
|
package/dist/index.mjs
CHANGED
|
@@ -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/base-error.ts:202](https://github.com/isdk/ai-tool.js/blob/
|
|
89
|
+
[packages/ai-tool/src/utils/base-error.ts:202](https://github.com/isdk/ai-tool.js/blob/c377a1408daee78a2484142b6d99ef7fbbec7c7c/src/utils/base-error.ts#L202)
|
|
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
|
-
[packages/ai-tool/src/utils/base-error.ts:64](https://github.com/isdk/ai-tool.js/blob/
|
|
105
|
+
[packages/ai-tool/src/utils/base-error.ts:64](https://github.com/isdk/ai-tool.js/blob/c377a1408daee78a2484142b6d99ef7fbbec7c7c/src/utils/base-error.ts#L64)
|
|
106
106
|
|
|
107
107
|
___
|
|
108
108
|
|
|
@@ -130,7 +130,7 @@ ___
|
|
|
130
130
|
|
|
131
131
|
#### Defined in
|
|
132
132
|
|
|
133
|
-
[packages/ai-tool/src/utils/base-error.ts:65](https://github.com/isdk/ai-tool.js/blob/
|
|
133
|
+
[packages/ai-tool/src/utils/base-error.ts:65](https://github.com/isdk/ai-tool.js/blob/c377a1408daee78a2484142b6d99ef7fbbec7c7c/src/utils/base-error.ts#L65)
|
|
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
|
-
[packages/ai-tool/src/utils/base-error.ts:66](https://github.com/isdk/ai-tool.js/blob/
|
|
149
|
+
[packages/ai-tool/src/utils/base-error.ts:66](https://github.com/isdk/ai-tool.js/blob/c377a1408daee78a2484142b6d99ef7fbbec7c7c/src/utils/base-error.ts#L66)
|
|
150
150
|
|
|
151
151
|
___
|
|
152
152
|
|
|
@@ -204,7 +204,7 @@ The error code associated with the error.
|
|
|
204
204
|
|
|
205
205
|
#### Defined in
|
|
206
206
|
|
|
207
|
-
[packages/ai-tool/src/utils/base-error.ts:201](https://github.com/isdk/ai-tool.js/blob/
|
|
207
|
+
[packages/ai-tool/src/utils/base-error.ts:201](https://github.com/isdk/ai-tool.js/blob/c377a1408daee78a2484142b6d99ef7fbbec7c7c/src/utils/base-error.ts#L201)
|
|
208
208
|
|
|
209
209
|
___
|
|
210
210
|
|
|
@@ -281,7 +281,7 @@ A new BaseError instance.
|
|
|
281
281
|
|
|
282
282
|
#### Defined in
|
|
283
283
|
|
|
284
|
-
[packages/ai-tool/src/utils/base-error.ts:129](https://github.com/isdk/ai-tool.js/blob/
|
|
284
|
+
[packages/ai-tool/src/utils/base-error.ts:129](https://github.com/isdk/ai-tool.js/blob/c377a1408daee78a2484142b6d99ef7fbbec7c7c/src/utils/base-error.ts#L129)
|
|
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
|
-
[packages/ai-tool/src/utils/base-error.ts:109](https://github.com/isdk/ai-tool.js/blob/
|
|
306
|
+
[packages/ai-tool/src/utils/base-error.ts:109](https://github.com/isdk/ai-tool.js/blob/c377a1408daee78a2484142b6d99ef7fbbec7c7c/src/utils/base-error.ts#L109)
|
|
307
307
|
|
|
308
308
|
___
|
|
309
309
|
|
|
@@ -356,4 +356,4 @@ typeof [`BaseError`](BaseError.md)
|
|
|
356
356
|
|
|
357
357
|
#### Defined in
|
|
358
358
|
|
|
359
|
-
[packages/ai-tool/src/utils/base-error.ts:68](https://github.com/isdk/ai-tool.js/blob/
|
|
359
|
+
[packages/ai-tool/src/utils/base-error.ts:68](https://github.com/isdk/ai-tool.js/blob/c377a1408daee78a2484142b6d99ef7fbbec7c7c/src/utils/base-error.ts#L68)
|
|
@@ -66,7 +66,7 @@ throw new AlreadyExistsError('user', { id: 123 })
|
|
|
66
66
|
|
|
67
67
|
#### Defined in
|
|
68
68
|
|
|
69
|
-
[packages/ai-tool/src/utils/base-error.ts:193](https://github.com/isdk/ai-tool.js/blob/
|
|
69
|
+
[packages/ai-tool/src/utils/base-error.ts:193](https://github.com/isdk/ai-tool.js/blob/c377a1408daee78a2484142b6d99ef7fbbec7c7c/src/utils/base-error.ts#L193)
|
|
70
70
|
|
|
71
71
|
## Properties
|
|
72
72
|
|
|
@@ -82,7 +82,7 @@ The name of the function that threw the error.
|
|
|
82
82
|
|
|
83
83
|
#### Defined in
|
|
84
84
|
|
|
85
|
-
[packages/ai-tool/src/utils/base-error.ts:64](https://github.com/isdk/ai-tool.js/blob/
|
|
85
|
+
[packages/ai-tool/src/utils/base-error.ts:64](https://github.com/isdk/ai-tool.js/blob/c377a1408daee78a2484142b6d99ef7fbbec7c7c/src/utils/base-error.ts#L64)
|
|
86
86
|
|
|
87
87
|
___
|
|
88
88
|
|
|
@@ -110,7 +110,7 @@ ___
|
|
|
110
110
|
|
|
111
111
|
#### Defined in
|
|
112
112
|
|
|
113
|
-
[packages/ai-tool/src/utils/base-error.ts:65](https://github.com/isdk/ai-tool.js/blob/
|
|
113
|
+
[packages/ai-tool/src/utils/base-error.ts:65](https://github.com/isdk/ai-tool.js/blob/c377a1408daee78a2484142b6d99ef7fbbec7c7c/src/utils/base-error.ts#L65)
|
|
114
114
|
|
|
115
115
|
___
|
|
116
116
|
|
|
@@ -126,7 +126,7 @@ Additional data associated with the error.
|
|
|
126
126
|
|
|
127
127
|
#### Defined in
|
|
128
128
|
|
|
129
|
-
[packages/ai-tool/src/utils/base-error.ts:66](https://github.com/isdk/ai-tool.js/blob/
|
|
129
|
+
[packages/ai-tool/src/utils/base-error.ts:66](https://github.com/isdk/ai-tool.js/blob/c377a1408daee78a2484142b6d99ef7fbbec7c7c/src/utils/base-error.ts#L66)
|
|
130
130
|
|
|
131
131
|
___
|
|
132
132
|
|
|
@@ -184,7 +184,7 @@ The error code associated with the error.
|
|
|
184
184
|
|
|
185
185
|
#### Defined in
|
|
186
186
|
|
|
187
|
-
[packages/ai-tool/src/utils/base-error.ts:192](https://github.com/isdk/ai-tool.js/blob/
|
|
187
|
+
[packages/ai-tool/src/utils/base-error.ts:192](https://github.com/isdk/ai-tool.js/blob/c377a1408daee78a2484142b6d99ef7fbbec7c7c/src/utils/base-error.ts#L192)
|
|
188
188
|
|
|
189
189
|
___
|
|
190
190
|
|
|
@@ -261,7 +261,7 @@ A new BaseError instance.
|
|
|
261
261
|
|
|
262
262
|
#### Defined in
|
|
263
263
|
|
|
264
|
-
[packages/ai-tool/src/utils/base-error.ts:129](https://github.com/isdk/ai-tool.js/blob/
|
|
264
|
+
[packages/ai-tool/src/utils/base-error.ts:129](https://github.com/isdk/ai-tool.js/blob/c377a1408daee78a2484142b6d99ef7fbbec7c7c/src/utils/base-error.ts#L129)
|
|
265
265
|
|
|
266
266
|
___
|
|
267
267
|
|
|
@@ -283,7 +283,7 @@ A JSON representation of the error.
|
|
|
283
283
|
|
|
284
284
|
#### Defined in
|
|
285
285
|
|
|
286
|
-
[packages/ai-tool/src/utils/base-error.ts:109](https://github.com/isdk/ai-tool.js/blob/
|
|
286
|
+
[packages/ai-tool/src/utils/base-error.ts:109](https://github.com/isdk/ai-tool.js/blob/c377a1408daee78a2484142b6d99ef7fbbec7c7c/src/utils/base-error.ts#L109)
|
|
287
287
|
|
|
288
288
|
___
|
|
289
289
|
|
|
@@ -336,4 +336,4 @@ typeof [`BaseError`](BaseError.md)
|
|
|
336
336
|
|
|
337
337
|
#### Defined in
|
|
338
338
|
|
|
339
|
-
[packages/ai-tool/src/utils/base-error.ts:68](https://github.com/isdk/ai-tool.js/blob/
|
|
339
|
+
[packages/ai-tool/src/utils/base-error.ts:68](https://github.com/isdk/ai-tool.js/blob/c377a1408daee78a2484142b6d99ef7fbbec7c7c/src/utils/base-error.ts#L68)
|
|
@@ -93,7 +93,7 @@ AbstractError.constructor
|
|
|
93
93
|
|
|
94
94
|
#### Defined in
|
|
95
95
|
|
|
96
|
-
[packages/ai-tool/src/utils/base-error.ts:79](https://github.com/isdk/ai-tool.js/blob/
|
|
96
|
+
[packages/ai-tool/src/utils/base-error.ts:79](https://github.com/isdk/ai-tool.js/blob/c377a1408daee78a2484142b6d99ef7fbbec7c7c/src/utils/base-error.ts#L79)
|
|
97
97
|
|
|
98
98
|
## Properties
|
|
99
99
|
|
|
@@ -105,7 +105,7 @@ The name of the function that threw the error.
|
|
|
105
105
|
|
|
106
106
|
#### Defined in
|
|
107
107
|
|
|
108
|
-
[packages/ai-tool/src/utils/base-error.ts:64](https://github.com/isdk/ai-tool.js/blob/
|
|
108
|
+
[packages/ai-tool/src/utils/base-error.ts:64](https://github.com/isdk/ai-tool.js/blob/c377a1408daee78a2484142b6d99ef7fbbec7c7c/src/utils/base-error.ts#L64)
|
|
109
109
|
|
|
110
110
|
___
|
|
111
111
|
|
|
@@ -133,7 +133,7 @@ AbstractError.code
|
|
|
133
133
|
|
|
134
134
|
#### Defined in
|
|
135
135
|
|
|
136
|
-
[packages/ai-tool/src/utils/base-error.ts:65](https://github.com/isdk/ai-tool.js/blob/
|
|
136
|
+
[packages/ai-tool/src/utils/base-error.ts:65](https://github.com/isdk/ai-tool.js/blob/c377a1408daee78a2484142b6d99ef7fbbec7c7c/src/utils/base-error.ts#L65)
|
|
137
137
|
|
|
138
138
|
___
|
|
139
139
|
|
|
@@ -145,7 +145,7 @@ Additional data associated with the error.
|
|
|
145
145
|
|
|
146
146
|
#### Defined in
|
|
147
147
|
|
|
148
|
-
[packages/ai-tool/src/utils/base-error.ts:66](https://github.com/isdk/ai-tool.js/blob/
|
|
148
|
+
[packages/ai-tool/src/utils/base-error.ts:66](https://github.com/isdk/ai-tool.js/blob/c377a1408daee78a2484142b6d99ef7fbbec7c7c/src/utils/base-error.ts#L66)
|
|
149
149
|
|
|
150
150
|
___
|
|
151
151
|
|
|
@@ -199,7 +199,7 @@ The error code associated with the error.
|
|
|
199
199
|
|
|
200
200
|
#### Defined in
|
|
201
201
|
|
|
202
|
-
[packages/ai-tool/src/utils/base-error.ts:63](https://github.com/isdk/ai-tool.js/blob/
|
|
202
|
+
[packages/ai-tool/src/utils/base-error.ts:63](https://github.com/isdk/ai-tool.js/blob/c377a1408daee78a2484142b6d99ef7fbbec7c7c/src/utils/base-error.ts#L63)
|
|
203
203
|
|
|
204
204
|
___
|
|
205
205
|
|
|
@@ -272,7 +272,7 @@ A new BaseError instance.
|
|
|
272
272
|
|
|
273
273
|
#### Defined in
|
|
274
274
|
|
|
275
|
-
[packages/ai-tool/src/utils/base-error.ts:129](https://github.com/isdk/ai-tool.js/blob/
|
|
275
|
+
[packages/ai-tool/src/utils/base-error.ts:129](https://github.com/isdk/ai-tool.js/blob/c377a1408daee78a2484142b6d99ef7fbbec7c7c/src/utils/base-error.ts#L129)
|
|
276
276
|
|
|
277
277
|
___
|
|
278
278
|
|
|
@@ -290,7 +290,7 @@ A JSON representation of the error.
|
|
|
290
290
|
|
|
291
291
|
#### Defined in
|
|
292
292
|
|
|
293
|
-
[packages/ai-tool/src/utils/base-error.ts:109](https://github.com/isdk/ai-tool.js/blob/
|
|
293
|
+
[packages/ai-tool/src/utils/base-error.ts:109](https://github.com/isdk/ai-tool.js/blob/c377a1408daee78a2484142b6d99ef7fbbec7c7c/src/utils/base-error.ts#L109)
|
|
294
294
|
|
|
295
295
|
___
|
|
296
296
|
|
|
@@ -343,4 +343,4 @@ AbstractError.createErrorClass
|
|
|
343
343
|
|
|
344
344
|
#### Defined in
|
|
345
345
|
|
|
346
|
-
[packages/ai-tool/src/utils/base-error.ts:68](https://github.com/isdk/ai-tool.js/blob/
|
|
346
|
+
[packages/ai-tool/src/utils/base-error.ts:68](https://github.com/isdk/ai-tool.js/blob/c377a1408daee78a2484142b6d99ef7fbbec7c7c/src/utils/base-error.ts#L68)
|