typia 12.0.0-dev.20260305 → 12.0.0-dev.20260307
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/lib/internal/_llmApplicationFinalize.d.ts +2 -2
- package/lib/internal/_llmApplicationFinalize.js +5 -13
- package/lib/internal/_llmApplicationFinalize.js.map +1 -1
- package/lib/internal/_llmApplicationFinalize.mjs +11 -17
- package/lib/internal/_llmApplicationFinalize.mjs.map +1 -1
- package/lib/llm.d.ts +8 -15
- package/lib/llm.js.map +1 -1
- package/lib/llm.mjs.map +1 -1
- package/lib/re-exports.d.ts +1 -1
- package/lib/re-exports.js.map +1 -1
- package/package.json +5 -5
- package/src/internal/_llmApplicationFinalize.ts +16 -25
- package/src/llm.ts +8 -19
- package/src/re-exports.ts +2 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ILlmApplication } from "@typia/interface";
|
|
2
|
-
export declare const _llmApplicationFinalize: (app: ILlmApplication
|
|
2
|
+
export declare const _llmApplicationFinalize: <Class extends object = any>(app: ILlmApplication.__IPrimitive<Class>, config?: Partial<Pick<ILlmApplication.IConfig, "validate"> & {
|
|
3
3
|
equals?: boolean;
|
|
4
|
-
}>) =>
|
|
4
|
+
}>) => ILlmApplication<Class>;
|
|
@@ -3,19 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports._llmApplicationFinalize = void 0;
|
|
4
4
|
const utils_1 = require("@typia/utils");
|
|
5
5
|
const _llmApplicationFinalize = (app, config) => {
|
|
6
|
-
var _a
|
|
7
|
-
app
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
parameters: func.parameters,
|
|
12
|
-
predicate: app.config.separate,
|
|
13
|
-
equals: (_c = config === null || config === void 0 ? void 0 : config.equals) !== null && _c !== void 0 ? _c : false,
|
|
14
|
-
});
|
|
15
|
-
if (app.config.validate !== null)
|
|
16
|
-
for (const func of app.functions)
|
|
17
|
-
if (typeof ((_d = app.config.validate) === null || _d === void 0 ? void 0 : _d[func.name]) === "function")
|
|
18
|
-
func.validate = app.config.validate[func.name];
|
|
6
|
+
var _a;
|
|
7
|
+
return (Object.assign(Object.assign({}, app), { config: Object.assign(Object.assign({}, utils_1.LlmSchemaConverter.getConfig()), { validate: (_a = config === null || config === void 0 ? void 0 : config.validate) !== null && _a !== void 0 ? _a : null }), functions: app.functions.map((func) => {
|
|
8
|
+
var _a, _b;
|
|
9
|
+
return (Object.assign(Object.assign({}, func), { parse: (input) => utils_1.LlmJson.parse(input, func.parameters), validate: (_b = (_a = config === null || config === void 0 ? void 0 : config.validate) === null || _a === void 0 ? void 0 : _a[func.name]) !== null && _b !== void 0 ? _b : func.validate }));
|
|
10
|
+
}) }));
|
|
19
11
|
};
|
|
20
12
|
exports._llmApplicationFinalize = _llmApplicationFinalize;
|
|
21
13
|
//# sourceMappingURL=_llmApplicationFinalize.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_llmApplicationFinalize.js","sourceRoot":"","sources":["../../src/internal/_llmApplicationFinalize.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"_llmApplicationFinalize.js","sourceRoot":"","sources":["../../src/internal/_llmApplicationFinalize.ts"],"names":[],"mappings":";;;AACA,wCAA2D;AAEpD,MAAM,uBAAuB,GAAG,CACrC,GAAwC,EACxC,MAIC,EACuB,EAAE;;IAAC,OAAA,iCACxB,GAAG,KACN,MAAM,kCACD,0BAAkB,CAAC,SAAS,EAAE,KACjC,QAAQ,EAAE,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,mCAAI,IAAI,KAEpC,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;;YAAC,OAAA,iCAClC,IAAI,KACP,KAAK,EAAE,CAAC,KAAa,EAA6B,EAAE,CAClD,eAAO,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,EACvC,QAAQ,EAAE,MAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,0CAAG,IAAI,CAAC,IAAI,CAAC,mCAAI,IAAI,CAAC,QAAQ,IACxD,CAAA;SAAA,CAAC,IACH,CAAA;CAAA,CAAC;AAnBU,QAAA,uBAAuB,2BAmBjC"}
|
|
@@ -1,23 +1,17 @@
|
|
|
1
|
-
import { LlmSchemaConverter } from '@typia/utils';
|
|
1
|
+
import { LlmJson, LlmSchemaConverter } from '@typia/utils';
|
|
2
2
|
|
|
3
|
-
const _llmApplicationFinalize = (app, config) => {
|
|
4
|
-
app
|
|
3
|
+
const _llmApplicationFinalize = (app, config) => ({
|
|
4
|
+
...app,
|
|
5
|
+
config: {
|
|
5
6
|
...LlmSchemaConverter.getConfig(),
|
|
6
|
-
separate: config?.separate ?? null,
|
|
7
7
|
validate: config?.validate ?? null,
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
});
|
|
16
|
-
if (app.config.validate !== null)
|
|
17
|
-
for (const func of app.functions)
|
|
18
|
-
if (typeof app.config.validate?.[func.name] === "function")
|
|
19
|
-
func.validate = app.config.validate[func.name];
|
|
20
|
-
};
|
|
8
|
+
},
|
|
9
|
+
functions: app.functions.map((func) => ({
|
|
10
|
+
...func,
|
|
11
|
+
parse: (input) => LlmJson.parse(input, func.parameters),
|
|
12
|
+
validate: config?.validate?.[func.name] ?? func.validate,
|
|
13
|
+
})),
|
|
14
|
+
});
|
|
21
15
|
|
|
22
16
|
export { _llmApplicationFinalize };
|
|
23
17
|
//# sourceMappingURL=_llmApplicationFinalize.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_llmApplicationFinalize.mjs","sources":["../../src/internal/_llmApplicationFinalize.ts"],"sourcesContent":[null],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"_llmApplicationFinalize.mjs","sources":["../../src/internal/_llmApplicationFinalize.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAGO,MAAM,uBAAuB,GAAG,CACrC,GAAwC,EACxC,MAIC,MAC2B;AAC5B,IAAA,GAAG,GAAG;AACN,IAAA,MAAM,EAAE;QACN,GAAG,kBAAkB,CAAC,SAAS,EAAE;AACjC,QAAA,QAAQ,EAAE,MAAM,EAAE,QAAQ,IAAI,IAAI;AACnC,KAAA;AACD,IAAA,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,MAAM;AACtC,QAAA,GAAG,IAAI;AACP,QAAA,KAAK,EAAE,CAAC,KAAa,KACnB,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC;AACvC,QAAA,QAAQ,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,QAAQ;AACzD,KAAA,CAAC,CAAC;AACJ,CAAA;;;;"}
|
package/lib/llm.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { ILlmApplication, ILlmController, ILlmSchema } from "@typia/interface";
|
|
|
4
4
|
*
|
|
5
5
|
* @danger You must configure the generic argument `Class`
|
|
6
6
|
*/
|
|
7
|
-
export declare function controller(name: string, execute: object, config?: Partial<Pick<ILlmApplication.IConfig<any>, "
|
|
7
|
+
export declare function controller(name: string, execute: object, config?: Partial<Pick<ILlmApplication.IConfig<any>, "validate">>): never;
|
|
8
8
|
/**
|
|
9
9
|
* Creates LLM function calling controller from class/interface.
|
|
10
10
|
*
|
|
@@ -14,16 +14,13 @@ export declare function controller(name: string, execute: object, config?: Parti
|
|
|
14
14
|
*
|
|
15
15
|
* Each {@link ILlmFunction} includes a built-in {@link ILlmFunction.validate}
|
|
16
16
|
* function that validates LLM-generated arguments before execution. When
|
|
17
|
-
* validation fails, use `
|
|
18
|
-
*
|
|
17
|
+
* validation fails, use `LlmJson.stringify()` from `@typia/utils` to format
|
|
18
|
+
* errors for LLM feedback, enabling auto-correction.
|
|
19
19
|
*
|
|
20
20
|
* When passed to LLM providers (ChatGPT, Claude, Gemini, etc.), the LLM
|
|
21
21
|
* automatically selects functions and fills arguments from conversation.
|
|
22
22
|
* Execute the selected function via {@link ILlmController.execute}.
|
|
23
23
|
*
|
|
24
|
-
* Configure {@link ILlmApplication.IConfig.separate} to split parameters between
|
|
25
|
-
* LLM-fillable and human-required (e.g., file uploads, passwords).
|
|
26
|
-
*
|
|
27
24
|
* Related functions:
|
|
28
25
|
*
|
|
29
26
|
* - {@link application} — Schemas only, without executor
|
|
@@ -48,13 +45,13 @@ export declare function controller<Class extends Record<string, any>, Config ext
|
|
|
48
45
|
* @default false
|
|
49
46
|
*/
|
|
50
47
|
equals: boolean;
|
|
51
|
-
}> = {}>(name: string, execute: Class, config?: Partial<Pick<ILlmApplication.IConfig<Class>, "
|
|
48
|
+
}> = {}>(name: string, execute: Class, config?: Partial<Pick<ILlmApplication.IConfig<Class>, "validate">>): ILlmController<Class>;
|
|
52
49
|
/**
|
|
53
50
|
* Creates LLM function calling application.
|
|
54
51
|
*
|
|
55
52
|
* @danger You must configure the generic argument `Class`
|
|
56
53
|
*/
|
|
57
|
-
export declare function application(config?: Partial<Pick<ILlmApplication.IConfig<any>, "
|
|
54
|
+
export declare function application(config?: Partial<Pick<ILlmApplication.IConfig<any>, "validate">>): never;
|
|
58
55
|
/**
|
|
59
56
|
* Creates LLM function calling application from class/interface.
|
|
60
57
|
*
|
|
@@ -64,17 +61,13 @@ export declare function application(config?: Partial<Pick<ILlmApplication.IConfi
|
|
|
64
61
|
*
|
|
65
62
|
* Each {@link ILlmFunction} includes a built-in {@link ILlmFunction.validate}
|
|
66
63
|
* function that validates LLM-generated arguments before execution. When
|
|
67
|
-
* validation fails, use `
|
|
68
|
-
*
|
|
64
|
+
* validation fails, use `LlmJson.stringify()` from `@typia/utils` to format
|
|
65
|
+
* errors for LLM feedback, enabling auto-correction.
|
|
69
66
|
*
|
|
70
67
|
* When passed to LLM providers (ChatGPT, Claude, Gemini, etc.), the LLM
|
|
71
68
|
* automatically selects functions and fills arguments from conversation. You
|
|
72
69
|
* execute the function manually with the LLM-prepared arguments.
|
|
73
70
|
*
|
|
74
|
-
* Configure {@link ILlmApplication.IConfig.separate} to split parameters between
|
|
75
|
-
* LLM-fillable and human-required (e.g., file uploads, passwords). Merge them
|
|
76
|
-
* with {@link HttpLlm.mergeParameters} before execution.
|
|
77
|
-
*
|
|
78
71
|
* Related functions:
|
|
79
72
|
*
|
|
80
73
|
* - {@link controller} — Includes executor alongside schemas
|
|
@@ -97,7 +90,7 @@ export declare function application<Class extends Record<string, any>, Config ex
|
|
|
97
90
|
* @default false
|
|
98
91
|
*/
|
|
99
92
|
equals: boolean;
|
|
100
|
-
}> = {}>(config?: Partial<Pick<ILlmApplication.IConfig<Class>, "
|
|
93
|
+
}> = {}>(config?: Partial<Pick<ILlmApplication.IConfig<Class>, "validate">>): ILlmApplication<Class>;
|
|
101
94
|
/**
|
|
102
95
|
* Creates LLM parameters schema.
|
|
103
96
|
*
|
package/lib/llm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm.js","sourceRoot":"","sources":["../src/llm.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"llm.js","sourceRoot":"","sources":["../src/llm.ts"],"names":[],"mappings":";;AAmEA,gCAEC;AA2DD,kCAEC;AAqCD,gCAEC;AAuCD,wBAEC;AAhND,gGAA6F;AAgE7F,gBAAgB;AAChB,SAAgB,UAAU,CAAC,GAAG,KAAY;IACxC,IAAA,6DAA6B,EAAC,gBAAgB,CAAC,CAAC;AAClD,CAAC;AA0DD,gBAAgB;AAChB,SAAgB,WAAW;IACzB,IAAA,6DAA6B,EAAC,iBAAiB,CAAC,CAAC;AACnD,CAAC;AAoCD,gBAAgB;AAChB,SAAgB,UAAU;IACxB,IAAA,6DAA6B,EAAC,gBAAgB,CAAC,CAAC;AAClD,CAAC;AAsCD,gBAAgB;AAChB,SAAgB,MAAM;IACpB,IAAA,6DAA6B,EAAC,YAAY,CAAC,CAAC;AAC9C,CAAC"}
|
package/lib/llm.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm.mjs","sources":["../src/llm.ts"],"sourcesContent":[null],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"llm.mjs","sources":["../src/llm.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAkEA;AACM,SAAU,UAAU,CAAC,GAAG,KAAY,EAAA;IACxC,6BAA6B,CAAC,gBAAgB,CAAC;AACjD;AA0DA;SACgB,WAAW,GAAA;IACzB,6BAA6B,CAAC,iBAAiB,CAAC;AAClD;AAoCA;SACgB,UAAU,GAAA;IACxB,6BAA6B,CAAC,gBAAgB,CAAC;AACjD;AAsCA;SACgB,MAAM,GAAA;IACpB,6BAA6B,CAAC,YAAY,CAAC;AAC7C;;;;"}
|
package/lib/re-exports.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { AssertionGuard, IValidation, IRandomGenerator, OpenApi, IJsonSchemaCollection, IJsonSchemaUnit, ILlmController, ILlmApplication, ILlmFunction, ILlmSchema, IMetadataSchema, IMetadataSchemaCollection, IMetadataSchemaUnit, IMetadataComponents, IMetadataTypeTag, IJsDocTagInfo, Primitive, Resolved, CamelCase, PascalCase, SnakeCase, tags, } from "@typia/interface";
|
|
1
|
+
export { AssertionGuard, IValidation, IRandomGenerator, OpenApi, IJsonSchemaCollection, IJsonSchemaUnit, ILlmController, ILlmApplication, ILlmFunction, ILlmSchema, IMetadataSchema, IMetadataSchemaCollection, IMetadataSchemaUnit, IMetadataComponents, IMetadataTypeTag, IJsDocTagInfo, Primitive, Resolved, CamelCase, PascalCase, SnakeCase, IReadableURLSearchParams, tags, } from "@typia/interface";
|
package/lib/re-exports.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"re-exports.js","sourceRoot":"","sources":["../src/re-exports.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"re-exports.js","sourceRoot":"","sources":["../src/re-exports.ts"],"names":[],"mappings":";;;AAAA,8CA+B0B;AAFxB,aAAa;AACb,iGAAA,IAAI,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "typia",
|
|
3
|
-
"version": "12.0.0-dev.
|
|
3
|
+
"version": "12.0.0-dev.20260307",
|
|
4
4
|
"description": "Superfast runtime validators with only one line",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"inquirer": "^8.2.5",
|
|
51
51
|
"package-manager-detector": "^0.2.0",
|
|
52
52
|
"randexp": "^0.5.3",
|
|
53
|
-
"@typia/
|
|
54
|
-
"@typia/
|
|
55
|
-
"@typia/
|
|
56
|
-
"@typia/utils": "^12.0.0-dev.
|
|
53
|
+
"@typia/core": "^12.0.0-dev.20260307",
|
|
54
|
+
"@typia/interface": "^12.0.0-dev.20260307",
|
|
55
|
+
"@typia/transform": "^12.0.0-dev.20260307",
|
|
56
|
+
"@typia/utils": "^12.0.0-dev.20260307"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"typescript": ">=4.8.0 <5.10.0"
|
|
@@ -1,32 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { LlmSchemaConverter } from "@typia/utils";
|
|
1
|
+
import { IJsonParseResult, ILlmApplication } from "@typia/interface";
|
|
2
|
+
import { LlmJson, LlmSchemaConverter } from "@typia/utils";
|
|
3
3
|
|
|
4
|
-
export const _llmApplicationFinalize = (
|
|
5
|
-
app: ILlmApplication
|
|
4
|
+
export const _llmApplicationFinalize = <Class extends object = any>(
|
|
5
|
+
app: ILlmApplication.__IPrimitive<Class>,
|
|
6
6
|
config?: Partial<
|
|
7
|
-
Pick<ILlmApplication.IConfig, "
|
|
7
|
+
Pick<ILlmApplication.IConfig, "validate"> & {
|
|
8
8
|
equals?: boolean;
|
|
9
9
|
}
|
|
10
10
|
>,
|
|
11
|
-
):
|
|
12
|
-
app
|
|
11
|
+
): ILlmApplication<Class> => ({
|
|
12
|
+
...app,
|
|
13
|
+
config: {
|
|
13
14
|
...LlmSchemaConverter.getConfig(),
|
|
14
|
-
separate: config?.separate ?? null,
|
|
15
15
|
validate: config?.validate ?? null,
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
if (app.config.validate !== null)
|
|
25
|
-
for (const func of app.functions)
|
|
26
|
-
if (typeof app.config.validate?.[func.name] === "function")
|
|
27
|
-
func.validate = app.config.validate[
|
|
28
|
-
func.name
|
|
29
|
-
]! satisfies Validator as Validator;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
type Validator = (input: unknown) => IValidation<unknown>;
|
|
16
|
+
},
|
|
17
|
+
functions: app.functions.map((func) => ({
|
|
18
|
+
...func,
|
|
19
|
+
parse: (input: string): IJsonParseResult<unknown> =>
|
|
20
|
+
LlmJson.parse(input, func.parameters),
|
|
21
|
+
validate: config?.validate?.[func.name] ?? func.validate,
|
|
22
|
+
})),
|
|
23
|
+
});
|
package/src/llm.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { NoTransformConfigurationError } from "./transformers/NoTransformConfigu
|
|
|
10
10
|
export function controller(
|
|
11
11
|
name: string,
|
|
12
12
|
execute: object,
|
|
13
|
-
config?: Partial<Pick<ILlmApplication.IConfig<any>, "
|
|
13
|
+
config?: Partial<Pick<ILlmApplication.IConfig<any>, "validate">>,
|
|
14
14
|
): never;
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -22,16 +22,13 @@ export function controller(
|
|
|
22
22
|
*
|
|
23
23
|
* Each {@link ILlmFunction} includes a built-in {@link ILlmFunction.validate}
|
|
24
24
|
* function that validates LLM-generated arguments before execution. When
|
|
25
|
-
* validation fails, use `
|
|
26
|
-
*
|
|
25
|
+
* validation fails, use `LlmJson.stringify()` from `@typia/utils` to format
|
|
26
|
+
* errors for LLM feedback, enabling auto-correction.
|
|
27
27
|
*
|
|
28
28
|
* When passed to LLM providers (ChatGPT, Claude, Gemini, etc.), the LLM
|
|
29
29
|
* automatically selects functions and fills arguments from conversation.
|
|
30
30
|
* Execute the selected function via {@link ILlmController.execute}.
|
|
31
31
|
*
|
|
32
|
-
* Configure {@link ILlmApplication.IConfig.separate} to split parameters between
|
|
33
|
-
* LLM-fillable and human-required (e.g., file uploads, passwords).
|
|
34
|
-
*
|
|
35
32
|
* Related functions:
|
|
36
33
|
*
|
|
37
34
|
* - {@link application} — Schemas only, without executor
|
|
@@ -64,9 +61,7 @@ export function controller<
|
|
|
64
61
|
>(
|
|
65
62
|
name: string,
|
|
66
63
|
execute: Class,
|
|
67
|
-
config?: Partial<
|
|
68
|
-
Pick<ILlmApplication.IConfig<Class>, "separate" | "validate">
|
|
69
|
-
>,
|
|
64
|
+
config?: Partial<Pick<ILlmApplication.IConfig<Class>, "validate">>,
|
|
70
65
|
): ILlmController<Class>;
|
|
71
66
|
|
|
72
67
|
/** @internal */
|
|
@@ -80,7 +75,7 @@ export function controller(..._args: any[]): never {
|
|
|
80
75
|
* @danger You must configure the generic argument `Class`
|
|
81
76
|
*/
|
|
82
77
|
export function application(
|
|
83
|
-
config?: Partial<Pick<ILlmApplication.IConfig<any>, "
|
|
78
|
+
config?: Partial<Pick<ILlmApplication.IConfig<any>, "validate">>,
|
|
84
79
|
): never;
|
|
85
80
|
|
|
86
81
|
/**
|
|
@@ -92,17 +87,13 @@ export function application(
|
|
|
92
87
|
*
|
|
93
88
|
* Each {@link ILlmFunction} includes a built-in {@link ILlmFunction.validate}
|
|
94
89
|
* function that validates LLM-generated arguments before execution. When
|
|
95
|
-
* validation fails, use `
|
|
96
|
-
*
|
|
90
|
+
* validation fails, use `LlmJson.stringify()` from `@typia/utils` to format
|
|
91
|
+
* errors for LLM feedback, enabling auto-correction.
|
|
97
92
|
*
|
|
98
93
|
* When passed to LLM providers (ChatGPT, Claude, Gemini, etc.), the LLM
|
|
99
94
|
* automatically selects functions and fills arguments from conversation. You
|
|
100
95
|
* execute the function manually with the LLM-prepared arguments.
|
|
101
96
|
*
|
|
102
|
-
* Configure {@link ILlmApplication.IConfig.separate} to split parameters between
|
|
103
|
-
* LLM-fillable and human-required (e.g., file uploads, passwords). Merge them
|
|
104
|
-
* with {@link HttpLlm.mergeParameters} before execution.
|
|
105
|
-
*
|
|
106
97
|
* Related functions:
|
|
107
98
|
*
|
|
108
99
|
* - {@link controller} — Includes executor alongside schemas
|
|
@@ -131,9 +122,7 @@ export function application<
|
|
|
131
122
|
}
|
|
132
123
|
> = {},
|
|
133
124
|
>(
|
|
134
|
-
config?: Partial<
|
|
135
|
-
Pick<ILlmApplication.IConfig<Class>, "separate" | "validate">
|
|
136
|
-
>,
|
|
125
|
+
config?: Partial<Pick<ILlmApplication.IConfig<Class>, "validate">>,
|
|
137
126
|
): ILlmApplication<Class>;
|
|
138
127
|
|
|
139
128
|
/** @internal */
|