@typia/langchain 13.0.0-dev.20260427-3 → 13.0.0-dev.20260430
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/index.mjs +2 -7
- package/lib/index.mjs.map +1 -1
- package/lib/index2.mjs +44 -51
- package/lib/index2.mjs.map +1 -1
- package/lib/internal/LangChainToolsRegistrar.mjs +2 -7
- package/lib/internal/LangChainToolsRegistrar.mjs.map +1 -1
- package/lib/internal/LangChainToolsRegistrar2.mjs +112 -120
- package/lib/internal/LangChainToolsRegistrar2.mjs.map +1 -1
- package/package.json +5 -5
- package/lib/_virtual/_commonjsHelpers.mjs +0 -6
- package/lib/_virtual/_commonjsHelpers.mjs.map +0 -1
package/lib/index.mjs
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var libExports = requireLib();
|
|
5
|
-
var index = /*@__PURE__*/getDefaultExportFromCjs(libExports);
|
|
6
|
-
|
|
7
|
-
export { index as default };
|
|
1
|
+
export { toLangChainTools } from './index2.mjs';
|
|
2
|
+
export { __exports as default } from './_virtual/index.mjs';
|
|
8
3
|
//# sourceMappingURL=index.mjs.map
|
package/lib/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/lib/index2.mjs
CHANGED
|
@@ -1,56 +1,49 @@
|
|
|
1
1
|
import { __exports as lib } from './_virtual/index.mjs';
|
|
2
|
-
import
|
|
2
|
+
import './internal/LangChainToolsRegistrar2.mjs';
|
|
3
|
+
import { __exports as LangChainToolsRegistrar } from './_virtual/LangChainToolsRegistrar.mjs';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
* @param props Conversion properties
|
|
46
|
-
* @returns Array of LangChain DynamicStructuredTool
|
|
47
|
-
*/
|
|
48
|
-
function toLangChainTools(props) {
|
|
49
|
-
return LangChainToolsRegistrar_1.LangChainToolsRegistrar.convert(props);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return lib;
|
|
5
|
+
Object.defineProperty(lib, "__esModule", { value: true });
|
|
6
|
+
var toLangChainTools_1 = lib.toLangChainTools = toLangChainTools;
|
|
7
|
+
const LangChainToolsRegistrar_1 = LangChainToolsRegistrar;
|
|
8
|
+
/**
|
|
9
|
+
* Convert typia controllers to LangChain tools.
|
|
10
|
+
*
|
|
11
|
+
* Converts TypeScript class methods via `typia.llm.controller<Class>()` or
|
|
12
|
+
* OpenAPI operations via `HttpLlm.controller()` to LangChain tools.
|
|
13
|
+
*
|
|
14
|
+
* Every tool call is validated by typia. If LLM provides invalid arguments,
|
|
15
|
+
* returns validation error formatted by {@link LlmJson.stringify} so that LLM
|
|
16
|
+
* can correct them automatically.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* import { initChatModel } from "langchain/chat_models/universal";
|
|
21
|
+
* import typia from "typia";
|
|
22
|
+
* import { toLangChainTools } from "@typia/langchain";
|
|
23
|
+
*
|
|
24
|
+
* class Calculator {
|
|
25
|
+
* add(input: { a: number; b: number }): { value: number } {
|
|
26
|
+
* return { value: input.a + input.b };
|
|
27
|
+
* }
|
|
28
|
+
* }
|
|
29
|
+
*
|
|
30
|
+
* const tools = toLangChainTools({
|
|
31
|
+
* controllers: [
|
|
32
|
+
* typia.llm.controller<Calculator>("calculator", new Calculator()),
|
|
33
|
+
* ],
|
|
34
|
+
* });
|
|
35
|
+
*
|
|
36
|
+
* const llm = await initChatModel();
|
|
37
|
+
* const modelWithTools = llm.bindTools(tools);
|
|
38
|
+
* const result = await modelWithTools.invoke("What is 10 + 5?");
|
|
39
|
+
* ```;
|
|
40
|
+
*
|
|
41
|
+
* @param props Conversion properties
|
|
42
|
+
* @returns Array of LangChain DynamicStructuredTool
|
|
43
|
+
*/
|
|
44
|
+
function toLangChainTools(props) {
|
|
45
|
+
return LangChainToolsRegistrar_1.LangChainToolsRegistrar.convert(props);
|
|
53
46
|
}
|
|
54
47
|
|
|
55
|
-
export {
|
|
48
|
+
export { lib as default, toLangChainTools_1 as toLangChainTools };
|
|
56
49
|
//# sourceMappingURL=index2.mjs.map
|
package/lib/index2.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index2.mjs","sources":["index.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toLangChainTools = toLangChainTools;\nconst LangChainToolsRegistrar_1 = require(\"./internal/LangChainToolsRegistrar\");\n/**\n * Convert typia controllers to LangChain tools.\n *\n * Converts TypeScript class methods via `typia.llm.controller<Class>()` or\n * OpenAPI operations via `HttpLlm.controller()` to LangChain tools.\n *\n * Every tool call is validated by typia. If LLM provides invalid arguments,\n * returns validation error formatted by {@link LlmJson.stringify} so that LLM\n * can correct them automatically.\n *\n * @example\n * ```typescript\n * import { initChatModel } from \"langchain/chat_models/universal\";\n * import typia from \"typia\";\n * import { toLangChainTools } from \"@typia/langchain\";\n *\n * class Calculator {\n * add(input: { a: number; b: number }): { value: number } {\n * return { value: input.a + input.b };\n * }\n * }\n *\n * const tools = toLangChainTools({\n * controllers: [\n * typia.llm.controller<Calculator>(\"calculator\", new Calculator()),\n * ],\n * });\n *\n * const llm = await initChatModel();\n * const modelWithTools = llm.bindTools(tools);\n * const result = await modelWithTools.invoke(\"What is 10 + 5?\");\n * ```;\n *\n * @param props Conversion properties\n * @returns Array of LangChain DynamicStructuredTool\n */\nfunction toLangChainTools(props) {\n return LangChainToolsRegistrar_1.LangChainToolsRegistrar.convert(props);\n}\n//# sourceMappingURL=index.js.map"],"names":["require$$0"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index2.mjs","sources":["index.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toLangChainTools = toLangChainTools;\nconst LangChainToolsRegistrar_1 = require(\"./internal/LangChainToolsRegistrar\");\n/**\n * Convert typia controllers to LangChain tools.\n *\n * Converts TypeScript class methods via `typia.llm.controller<Class>()` or\n * OpenAPI operations via `HttpLlm.controller()` to LangChain tools.\n *\n * Every tool call is validated by typia. If LLM provides invalid arguments,\n * returns validation error formatted by {@link LlmJson.stringify} so that LLM\n * can correct them automatically.\n *\n * @example\n * ```typescript\n * import { initChatModel } from \"langchain/chat_models/universal\";\n * import typia from \"typia\";\n * import { toLangChainTools } from \"@typia/langchain\";\n *\n * class Calculator {\n * add(input: { a: number; b: number }): { value: number } {\n * return { value: input.a + input.b };\n * }\n * }\n *\n * const tools = toLangChainTools({\n * controllers: [\n * typia.llm.controller<Calculator>(\"calculator\", new Calculator()),\n * ],\n * });\n *\n * const llm = await initChatModel();\n * const modelWithTools = llm.bindTools(tools);\n * const result = await modelWithTools.invoke(\"What is 10 + 5?\");\n * ```;\n *\n * @param props Conversion properties\n * @returns Array of LangChain DynamicStructuredTool\n */\nfunction toLangChainTools(props) {\n return LangChainToolsRegistrar_1.LangChainToolsRegistrar.convert(props);\n}\n//# sourceMappingURL=index.js.map"],"names":["require$$0"],"mappings":";;;;AACA,MAAM,CAAC,cAAc,CAAC,GAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,IAAA,kBAAA,GAAA,GAAA,CAAA,gBAAwB,GAAG;AAC3B,MAAM,yBAAyB,GAAGA,uBAA6C;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,gBAAgB,CAAC,KAAK,EAAE;AACjC,IAAI,OAAO,yBAAyB,CAAC,uBAAuB,CAAC,OAAO,CAAC,KAAK,CAAC;AAC3E;;;;"}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var LangChainToolsRegistrarExports = requireLangChainToolsRegistrar();
|
|
5
|
-
var LangChainToolsRegistrar = /*@__PURE__*/getDefaultExportFromCjs(LangChainToolsRegistrarExports);
|
|
6
|
-
|
|
7
|
-
export { LangChainToolsRegistrar as default };
|
|
1
|
+
export { LangChainToolsRegistrar } from './LangChainToolsRegistrar2.mjs';
|
|
2
|
+
export { __exports as default } from '../_virtual/LangChainToolsRegistrar.mjs';
|
|
8
3
|
//# sourceMappingURL=LangChainToolsRegistrar.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LangChainToolsRegistrar.mjs","sources":[
|
|
1
|
+
{"version":3,"file":"LangChainToolsRegistrar.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,125 +1,117 @@
|
|
|
1
|
-
import { __exports as LangChainToolsRegistrar } from '../_virtual/LangChainToolsRegistrar.mjs';
|
|
1
|
+
import { __exports as LangChainToolsRegistrar$1 } from '../_virtual/LangChainToolsRegistrar.mjs';
|
|
2
2
|
import require$$0 from '@langchain/core/tools';
|
|
3
3
|
import require$$1 from '@typia/utils';
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var __awaiter = (LangChainToolsRegistrar$1 && LangChainToolsRegistrar$1.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
6
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
8
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
9
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
10
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
11
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(LangChainToolsRegistrar$1, "__esModule", { value: true });
|
|
15
|
+
var LangChainToolsRegistrar_2 = LangChainToolsRegistrar$1.LangChainToolsRegistrar = void 0;
|
|
16
|
+
const tools_1 = require$$0;
|
|
17
|
+
const utils_1 = require$$1;
|
|
18
|
+
var LangChainToolsRegistrar;
|
|
19
|
+
(function (LangChainToolsRegistrar) {
|
|
20
|
+
LangChainToolsRegistrar.convert = (props) => {
|
|
21
|
+
var _a;
|
|
22
|
+
const prefix = (_a = props.prefix) !== null && _a !== void 0 ? _a : false;
|
|
23
|
+
const tools = [];
|
|
24
|
+
// check duplicate tool names
|
|
25
|
+
if (prefix === false && props.controllers.length >= 2) {
|
|
26
|
+
const names = new Map();
|
|
27
|
+
const duplicates = [];
|
|
28
|
+
for (const controller of props.controllers) {
|
|
29
|
+
for (const func of controller.application.functions) {
|
|
30
|
+
const existing = names.get(func.name);
|
|
31
|
+
if (existing !== undefined)
|
|
32
|
+
duplicates.push(`"${func.name}" in "${controller.name}" (conflicts with "${existing}")`);
|
|
33
|
+
else
|
|
34
|
+
names.set(func.name, controller.name);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (duplicates.length > 0)
|
|
38
|
+
throw new Error(`Duplicate tool names found:\n - ${duplicates.join("\n - ")}`);
|
|
39
|
+
}
|
|
40
|
+
// convert controllers to tools
|
|
41
|
+
for (const controller of props.controllers) {
|
|
42
|
+
if (controller.protocol === "class") {
|
|
43
|
+
convertClassController(tools, controller, prefix);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
convertHttpController(tools, controller, prefix);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return tools;
|
|
50
|
+
};
|
|
51
|
+
const convertClassController = (tools, controller, prefix) => {
|
|
52
|
+
const execute = controller.execute;
|
|
53
|
+
for (const func of controller.application.functions) {
|
|
54
|
+
const toolName = prefix
|
|
55
|
+
? `${controller.name}_${func.name}`
|
|
56
|
+
: func.name;
|
|
57
|
+
const method = execute[func.name];
|
|
58
|
+
if (typeof method !== "function") {
|
|
59
|
+
throw new Error(`Method "${func.name}" not found on controller "${controller.name}"`);
|
|
60
|
+
}
|
|
61
|
+
tools.push(createTool({
|
|
62
|
+
name: toolName,
|
|
63
|
+
function: func,
|
|
64
|
+
execute: (args) => __awaiter(this, void 0, void 0, function* () { return method.call(execute, args); }),
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
const convertHttpController = (tools, controller, prefix) => {
|
|
69
|
+
const application = controller.application;
|
|
70
|
+
const connection = controller.connection;
|
|
71
|
+
for (const func of application.functions) {
|
|
72
|
+
const toolName = prefix
|
|
73
|
+
? `${controller.name}_${func.name}`
|
|
74
|
+
: func.name;
|
|
75
|
+
tools.push(createTool({
|
|
76
|
+
name: toolName,
|
|
77
|
+
function: func,
|
|
78
|
+
execute: (args) => __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
if (controller.execute !== undefined) {
|
|
80
|
+
const response = yield controller.execute({
|
|
81
|
+
connection,
|
|
82
|
+
application,
|
|
83
|
+
function: func,
|
|
84
|
+
arguments: args,
|
|
85
|
+
});
|
|
86
|
+
return response.body;
|
|
87
|
+
}
|
|
88
|
+
return utils_1.HttpLlm.execute({
|
|
89
|
+
application,
|
|
90
|
+
function: func,
|
|
91
|
+
connection,
|
|
92
|
+
input: args,
|
|
93
|
+
});
|
|
94
|
+
}),
|
|
95
|
+
}));
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
const createTool = (entry) => { var _a; return new tools_1.DynamicStructuredTool({
|
|
99
|
+
name: entry.name,
|
|
100
|
+
description: (_a = entry.function.description) !== null && _a !== void 0 ? _a : "",
|
|
101
|
+
schema: entry.function.parameters,
|
|
102
|
+
func: (args) => __awaiter(this, void 0, void 0, function* () {
|
|
103
|
+
const coerced = utils_1.LlmJson.coerce(args, entry.function.parameters);
|
|
104
|
+
const valid = entry.function.validate(coerced);
|
|
105
|
+
if (valid.success === false)
|
|
106
|
+
throw new tools_1.ToolInputParsingException(`Type errors in "${entry.name}" arguments:\n\n` +
|
|
107
|
+
`\`\`\`json\n${utils_1.LlmJson.stringify(valid)}\n\`\`\``, JSON.stringify(coerced));
|
|
108
|
+
const result = yield entry.execute(valid.data);
|
|
109
|
+
return result === undefined
|
|
110
|
+
? { success: true }
|
|
111
|
+
: { success: true, data: result };
|
|
112
|
+
}),
|
|
113
|
+
}); };
|
|
114
|
+
})(LangChainToolsRegistrar || (LangChainToolsRegistrar_2 = LangChainToolsRegistrar$1.LangChainToolsRegistrar = LangChainToolsRegistrar = {}));
|
|
6
115
|
|
|
7
|
-
|
|
8
|
-
if (hasRequiredLangChainToolsRegistrar) return LangChainToolsRegistrar;
|
|
9
|
-
hasRequiredLangChainToolsRegistrar = 1;
|
|
10
|
-
var __awaiter = (LangChainToolsRegistrar && LangChainToolsRegistrar.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
11
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
12
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
13
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
14
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
15
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
16
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
Object.defineProperty(LangChainToolsRegistrar, "__esModule", { value: true });
|
|
20
|
-
LangChainToolsRegistrar.LangChainToolsRegistrar = void 0;
|
|
21
|
-
const tools_1 = require$$0;
|
|
22
|
-
const utils_1 = require$$1;
|
|
23
|
-
var LangChainToolsRegistrar$1;
|
|
24
|
-
(function (LangChainToolsRegistrar) {
|
|
25
|
-
LangChainToolsRegistrar.convert = (props) => {
|
|
26
|
-
var _a;
|
|
27
|
-
const prefix = (_a = props.prefix) !== null && _a !== void 0 ? _a : false;
|
|
28
|
-
const tools = [];
|
|
29
|
-
// check duplicate tool names
|
|
30
|
-
if (prefix === false && props.controllers.length >= 2) {
|
|
31
|
-
const names = new Map();
|
|
32
|
-
const duplicates = [];
|
|
33
|
-
for (const controller of props.controllers) {
|
|
34
|
-
for (const func of controller.application.functions) {
|
|
35
|
-
const existing = names.get(func.name);
|
|
36
|
-
if (existing !== undefined)
|
|
37
|
-
duplicates.push(`"${func.name}" in "${controller.name}" (conflicts with "${existing}")`);
|
|
38
|
-
else
|
|
39
|
-
names.set(func.name, controller.name);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
if (duplicates.length > 0)
|
|
43
|
-
throw new Error(`Duplicate tool names found:\n - ${duplicates.join("\n - ")}`);
|
|
44
|
-
}
|
|
45
|
-
// convert controllers to tools
|
|
46
|
-
for (const controller of props.controllers) {
|
|
47
|
-
if (controller.protocol === "class") {
|
|
48
|
-
convertClassController(tools, controller, prefix);
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
convertHttpController(tools, controller, prefix);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return tools;
|
|
55
|
-
};
|
|
56
|
-
const convertClassController = (tools, controller, prefix) => {
|
|
57
|
-
const execute = controller.execute;
|
|
58
|
-
for (const func of controller.application.functions) {
|
|
59
|
-
const toolName = prefix
|
|
60
|
-
? `${controller.name}_${func.name}`
|
|
61
|
-
: func.name;
|
|
62
|
-
const method = execute[func.name];
|
|
63
|
-
if (typeof method !== "function") {
|
|
64
|
-
throw new Error(`Method "${func.name}" not found on controller "${controller.name}"`);
|
|
65
|
-
}
|
|
66
|
-
tools.push(createTool({
|
|
67
|
-
name: toolName,
|
|
68
|
-
function: func,
|
|
69
|
-
execute: (args) => __awaiter(this, void 0, void 0, function* () { return method.call(execute, args); }),
|
|
70
|
-
}));
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
const convertHttpController = (tools, controller, prefix) => {
|
|
74
|
-
const application = controller.application;
|
|
75
|
-
const connection = controller.connection;
|
|
76
|
-
for (const func of application.functions) {
|
|
77
|
-
const toolName = prefix
|
|
78
|
-
? `${controller.name}_${func.name}`
|
|
79
|
-
: func.name;
|
|
80
|
-
tools.push(createTool({
|
|
81
|
-
name: toolName,
|
|
82
|
-
function: func,
|
|
83
|
-
execute: (args) => __awaiter(this, void 0, void 0, function* () {
|
|
84
|
-
if (controller.execute !== undefined) {
|
|
85
|
-
const response = yield controller.execute({
|
|
86
|
-
connection,
|
|
87
|
-
application,
|
|
88
|
-
function: func,
|
|
89
|
-
arguments: args,
|
|
90
|
-
});
|
|
91
|
-
return response.body;
|
|
92
|
-
}
|
|
93
|
-
return utils_1.HttpLlm.execute({
|
|
94
|
-
application,
|
|
95
|
-
function: func,
|
|
96
|
-
connection,
|
|
97
|
-
input: args,
|
|
98
|
-
});
|
|
99
|
-
}),
|
|
100
|
-
}));
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
const createTool = (entry) => { var _a; return new tools_1.DynamicStructuredTool({
|
|
104
|
-
name: entry.name,
|
|
105
|
-
description: (_a = entry.function.description) !== null && _a !== void 0 ? _a : "",
|
|
106
|
-
schema: entry.function.parameters,
|
|
107
|
-
func: (args) => __awaiter(this, void 0, void 0, function* () {
|
|
108
|
-
const coerced = utils_1.LlmJson.coerce(args, entry.function.parameters);
|
|
109
|
-
const valid = entry.function.validate(coerced);
|
|
110
|
-
if (valid.success === false)
|
|
111
|
-
throw new tools_1.ToolInputParsingException(`Type errors in "${entry.name}" arguments:\n\n` +
|
|
112
|
-
`\`\`\`json\n${utils_1.LlmJson.stringify(valid)}\n\`\`\``, JSON.stringify(coerced));
|
|
113
|
-
const result = yield entry.execute(valid.data);
|
|
114
|
-
return result === undefined
|
|
115
|
-
? { success: true }
|
|
116
|
-
: { success: true, data: result };
|
|
117
|
-
}),
|
|
118
|
-
}); };
|
|
119
|
-
})(LangChainToolsRegistrar$1 || (LangChainToolsRegistrar.LangChainToolsRegistrar = LangChainToolsRegistrar$1 = {}));
|
|
120
|
-
|
|
121
|
-
return LangChainToolsRegistrar;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export { requireLangChainToolsRegistrar as __require };
|
|
116
|
+
export { LangChainToolsRegistrar_2 as LangChainToolsRegistrar, LangChainToolsRegistrar$1 as default };
|
|
125
117
|
//# sourceMappingURL=LangChainToolsRegistrar2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LangChainToolsRegistrar2.mjs","sources":["LangChainToolsRegistrar.js"],"sourcesContent":["\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LangChainToolsRegistrar = void 0;\nconst tools_1 = require(\"@langchain/core/tools\");\nconst utils_1 = require(\"@typia/utils\");\nvar LangChainToolsRegistrar;\n(function (LangChainToolsRegistrar) {\n LangChainToolsRegistrar.convert = (props) => {\n var _a;\n const prefix = (_a = props.prefix) !== null && _a !== void 0 ? _a : false;\n const tools = [];\n // check duplicate tool names\n if (prefix === false && props.controllers.length >= 2) {\n const names = new Map();\n const duplicates = [];\n for (const controller of props.controllers) {\n for (const func of controller.application.functions) {\n const existing = names.get(func.name);\n if (existing !== undefined)\n duplicates.push(`\"${func.name}\" in \"${controller.name}\" (conflicts with \"${existing}\")`);\n else\n names.set(func.name, controller.name);\n }\n }\n if (duplicates.length > 0)\n throw new Error(`Duplicate tool names found:\\n - ${duplicates.join(\"\\n - \")}`);\n }\n // convert controllers to tools\n for (const controller of props.controllers) {\n if (controller.protocol === \"class\") {\n convertClassController(tools, controller, prefix);\n }\n else {\n convertHttpController(tools, controller, prefix);\n }\n }\n return tools;\n };\n const convertClassController = (tools, controller, prefix) => {\n const execute = controller.execute;\n for (const func of controller.application.functions) {\n const toolName = prefix\n ? `${controller.name}_${func.name}`\n : func.name;\n const method = execute[func.name];\n if (typeof method !== \"function\") {\n throw new Error(`Method \"${func.name}\" not found on controller \"${controller.name}\"`);\n }\n tools.push(createTool({\n name: toolName,\n function: func,\n execute: (args) => __awaiter(this, void 0, void 0, function* () { return method.call(execute, args); }),\n }));\n }\n };\n const convertHttpController = (tools, controller, prefix) => {\n const application = controller.application;\n const connection = controller.connection;\n for (const func of application.functions) {\n const toolName = prefix\n ? `${controller.name}_${func.name}`\n : func.name;\n tools.push(createTool({\n name: toolName,\n function: func,\n execute: (args) => __awaiter(this, void 0, void 0, function* () {\n if (controller.execute !== undefined) {\n const response = yield controller.execute({\n connection,\n application,\n function: func,\n arguments: args,\n });\n return response.body;\n }\n return utils_1.HttpLlm.execute({\n application,\n function: func,\n connection,\n input: args,\n });\n }),\n }));\n }\n };\n const createTool = (entry) => { var _a; return new tools_1.DynamicStructuredTool({\n name: entry.name,\n description: (_a = entry.function.description) !== null && _a !== void 0 ? _a : \"\",\n schema: entry.function.parameters,\n func: (args) => __awaiter(this, void 0, void 0, function* () {\n const coerced = utils_1.LlmJson.coerce(args, entry.function.parameters);\n const valid = entry.function.validate(coerced);\n if (valid.success === false)\n throw new tools_1.ToolInputParsingException(`Type errors in \"${entry.name}\" arguments:\\n\\n` +\n `\\`\\`\\`json\\n${utils_1.LlmJson.stringify(valid)}\\n\\`\\`\\``, JSON.stringify(coerced));\n const result = yield entry.execute(valid.data);\n return result === undefined\n ? { success: true }\n : { success: true, data: result };\n }),\n }); };\n})(LangChainToolsRegistrar || (exports.LangChainToolsRegistrar = LangChainToolsRegistrar = {}));\n//# sourceMappingURL=LangChainToolsRegistrar.js.map"],"names":["this","LangChainToolsRegistrar_1","LangChainToolsRegistrar"],"mappings":";;;;;;;;;AACA,CAAA,IAAI,SAAS,GAAG,CAACA,uBAAI,IAAIA,uBAAI,CAAC,SAAS,KAAK,UAAU,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE;KACrF,SAAS,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,KAAK,YAAY,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,UAAU,OAAO,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAA,CAAE,CAAC,CAAC,CAAA;AAC9G,KAAI,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,EAAE,UAAU,OAAO,EAAE,MAAM,EAAE;AAC/D,SAAQ,SAAS,SAAS,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA,CAAE,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA,CAAE,CAAA;AACjG,SAAQ,SAAS,QAAQ,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,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CAAC,IAAI,CAAC,gBAAgB,CAAC;qBACvF,CAAC,YAAY,EAAE,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;aAC3F,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;aAC9C,OAAO,MAAM,KAAK;mBACZ,EAAE,OAAO,EAAE,IAAI;mBACf,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE;AACjD,SAAA,CAAS,CAAC;MACL,CAAC,CAAC,CAAA,CAAE;CACT,CAAC,EAAEA,yBAAuB,KAAKD,uBAAA,CAAA,uBAA+B,GAAGC,yBAAuB,GAAG,EAAE,CAAC,CAAC;AAC/F;;;;;;"}
|
|
1
|
+
{"version":3,"file":"LangChainToolsRegistrar2.mjs","sources":["LangChainToolsRegistrar.js"],"sourcesContent":["\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LangChainToolsRegistrar = void 0;\nconst tools_1 = require(\"@langchain/core/tools\");\nconst utils_1 = require(\"@typia/utils\");\nvar LangChainToolsRegistrar;\n(function (LangChainToolsRegistrar) {\n LangChainToolsRegistrar.convert = (props) => {\n var _a;\n const prefix = (_a = props.prefix) !== null && _a !== void 0 ? _a : false;\n const tools = [];\n // check duplicate tool names\n if (prefix === false && props.controllers.length >= 2) {\n const names = new Map();\n const duplicates = [];\n for (const controller of props.controllers) {\n for (const func of controller.application.functions) {\n const existing = names.get(func.name);\n if (existing !== undefined)\n duplicates.push(`\"${func.name}\" in \"${controller.name}\" (conflicts with \"${existing}\")`);\n else\n names.set(func.name, controller.name);\n }\n }\n if (duplicates.length > 0)\n throw new Error(`Duplicate tool names found:\\n - ${duplicates.join(\"\\n - \")}`);\n }\n // convert controllers to tools\n for (const controller of props.controllers) {\n if (controller.protocol === \"class\") {\n convertClassController(tools, controller, prefix);\n }\n else {\n convertHttpController(tools, controller, prefix);\n }\n }\n return tools;\n };\n const convertClassController = (tools, controller, prefix) => {\n const execute = controller.execute;\n for (const func of controller.application.functions) {\n const toolName = prefix\n ? `${controller.name}_${func.name}`\n : func.name;\n const method = execute[func.name];\n if (typeof method !== \"function\") {\n throw new Error(`Method \"${func.name}\" not found on controller \"${controller.name}\"`);\n }\n tools.push(createTool({\n name: toolName,\n function: func,\n execute: (args) => __awaiter(this, void 0, void 0, function* () { return method.call(execute, args); }),\n }));\n }\n };\n const convertHttpController = (tools, controller, prefix) => {\n const application = controller.application;\n const connection = controller.connection;\n for (const func of application.functions) {\n const toolName = prefix\n ? `${controller.name}_${func.name}`\n : func.name;\n tools.push(createTool({\n name: toolName,\n function: func,\n execute: (args) => __awaiter(this, void 0, void 0, function* () {\n if (controller.execute !== undefined) {\n const response = yield controller.execute({\n connection,\n application,\n function: func,\n arguments: args,\n });\n return response.body;\n }\n return utils_1.HttpLlm.execute({\n application,\n function: func,\n connection,\n input: args,\n });\n }),\n }));\n }\n };\n const createTool = (entry) => { var _a; return new tools_1.DynamicStructuredTool({\n name: entry.name,\n description: (_a = entry.function.description) !== null && _a !== void 0 ? _a : \"\",\n schema: entry.function.parameters,\n func: (args) => __awaiter(this, void 0, void 0, function* () {\n const coerced = utils_1.LlmJson.coerce(args, entry.function.parameters);\n const valid = entry.function.validate(coerced);\n if (valid.success === false)\n throw new tools_1.ToolInputParsingException(`Type errors in \"${entry.name}\" arguments:\\n\\n` +\n `\\`\\`\\`json\\n${utils_1.LlmJson.stringify(valid)}\\n\\`\\`\\``, JSON.stringify(coerced));\n const result = yield entry.execute(valid.data);\n return result === undefined\n ? { success: true }\n : { success: true, data: result };\n }),\n }); };\n})(LangChainToolsRegistrar || (exports.LangChainToolsRegistrar = LangChainToolsRegistrar = {}));\n//# sourceMappingURL=LangChainToolsRegistrar.js.map"],"names":["this","LangChainToolsRegistrar_1"],"mappings":";;;;AACA,IAAI,SAAS,GAAG,CAACA,yBAAI,IAAIA,yBAAI,CAAC,SAAS,KAAK,UAAU,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE;AACzF,IAAI,SAAS,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,KAAK,YAAY,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,UAAU,OAAO,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAA,CAAE,CAAC,CAAC,CAAA;AAC9G,IAAI,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,EAAE,UAAU,OAAO,EAAE,MAAM,EAAE;AAC/D,QAAQ,SAAS,SAAS,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA,CAAE,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA,CAAE,CAAA;AACjG,QAAQ,SAAS,QAAQ,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA,CAAE,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA,CAAE,CAAA;AACpG,QAAQ,SAAS,IAAI,CAAC,MAAM,EAAE,EAAE,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,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AAI,CAAC,gBAAgB,CAAC;AAC3G,oBAAoB,CAAC,YAAY,EAAE,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;AACvG,YAAY,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;AAC1D,YAAY,OAAO,MAAM,KAAK;AAC9B,kBAAkB,EAAE,OAAO,EAAE,IAAI;AACjC,kBAAkB,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE;AACjD,QAAA,CAAS,CAAC;AACV,KAAK,CAAC,CAAC,CAAA,CAAE;AACT,CAAC,EAAE,uBAAuB,KAAK,yBAAA,GAAAA,yBAAA,CAAA,uBAA+B,GAAG,uBAAuB,GAAG,EAAE,CAAC,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typia/langchain",
|
|
3
|
-
"version": "13.0.0-dev.
|
|
3
|
+
"version": "13.0.0-dev.20260430",
|
|
4
4
|
"description": "LangChain.js integration for typia",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"homepage": "https://typia.io",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@typia/interface": "^13.0.0-dev.
|
|
26
|
-
"@typia/utils": "^13.0.0-dev.
|
|
25
|
+
"@typia/interface": "^13.0.0-dev.20260430",
|
|
26
|
+
"@typia/utils": "^13.0.0-dev.20260430"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@langchain/core": ">=1.0.0"
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
"@langchain/core": "^1.1.31",
|
|
33
33
|
"@rollup/plugin-commonjs": "^29.0.0",
|
|
34
34
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
35
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
35
|
+
"@typescript/native-preview": "7.0.0-dev.20260429.1",
|
|
36
36
|
"rimraf": "^6.1.2",
|
|
37
37
|
"rollup": "^4.56.0",
|
|
38
38
|
"rollup-plugin-auto-external": "^2.0.0",
|
|
39
39
|
"rollup-plugin-node-externals": "^8.1.2",
|
|
40
40
|
"tinyglobby": "^0.2.12",
|
|
41
|
-
"ttsc": "^0.
|
|
41
|
+
"ttsc": "^0.6.0"
|
|
42
42
|
},
|
|
43
43
|
"sideEffects": false,
|
|
44
44
|
"files": [
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_commonjsHelpers.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|