llm-exe 0.0.3 → 0.0.4
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/embedding/base.js +1 -5
- package/dist/embedding/base.js.map +1 -1
- package/dist/embedding/openai.js +10 -13
- package/dist/embedding/openai.js.map +1 -1
- package/dist/executor/_base.d.ts +17 -6
- package/dist/executor/_base.js +74 -36
- package/dist/executor/_base.js.map +1 -1
- package/dist/executor/_functions.d.ts +2 -2
- package/dist/executor/_functions.js +6 -11
- package/dist/executor/_functions.js.map +1 -1
- package/dist/executor/_metadata.js +3 -18
- package/dist/executor/_metadata.js.map +1 -1
- package/dist/executor/core.js +4 -8
- package/dist/executor/core.js.map +1 -1
- package/dist/executor/index.js +4 -12
- package/dist/executor/index.js.map +1 -1
- package/dist/executor/llm.d.ts +3 -3
- package/dist/executor/llm.js +4 -8
- package/dist/executor/llm.js.map +1 -1
- package/dist/index.js +35 -61
- package/dist/index.js.map +1 -1
- package/dist/interfaces/chat.d.ts +7 -0
- package/dist/interfaces/chat.js +1 -2
- package/dist/interfaces/functions.d.ts +14 -24
- package/dist/interfaces/functions.js +1 -2
- package/dist/interfaces/functions.js.map +1 -1
- package/dist/interfaces/index.js +6 -22
- package/dist/interfaces/index.js.map +1 -1
- package/dist/interfaces/openai.js +1 -2
- package/dist/interfaces/parser.d.ts +1 -4
- package/dist/interfaces/parser.js +1 -2
- package/dist/interfaces/prompt.js +1 -2
- package/dist/interfaces/utils.js +1 -2
- package/dist/llm/_base.js +6 -10
- package/dist/llm/_base.js.map +1 -1
- package/dist/llm/index.js +2 -8
- package/dist/llm/index.js.map +1 -1
- package/dist/llm/openai.d.ts +3 -3
- package/dist/llm/openai.js +17 -20
- package/dist/llm/openai.js.map +1 -1
- package/dist/llm/output/base.js +3 -7
- package/dist/llm/output/base.js.map +1 -1
- package/dist/llm/output/index.js +6 -12
- package/dist/llm/output/index.js.map +1 -1
- package/dist/llm/output/openai.js +3 -8
- package/dist/llm/output/openai.js.map +1 -1
- package/dist/parser/_base.js +5 -10
- package/dist/parser/_base.js.map +1 -1
- package/dist/parser/_functions.d.ts +24 -15
- package/dist/parser/_functions.js +27 -29
- package/dist/parser/_functions.js.map +1 -1
- package/dist/parser/index.js +14 -30
- package/dist/parser/index.js.map +1 -1
- package/dist/parser/parsers/BooleanParser.js +4 -8
- package/dist/parser/parsers/BooleanParser.js.map +1 -1
- package/dist/parser/parsers/CustomParser.d.ts +7 -6
- package/dist/parser/parsers/CustomParser.js +5 -8
- package/dist/parser/parsers/CustomParser.js.map +1 -1
- package/dist/parser/parsers/JsonParser.js +4 -8
- package/dist/parser/parsers/JsonParser.js.map +1 -1
- package/dist/parser/parsers/ListToArrayParser.js +2 -6
- package/dist/parser/parsers/ListToArrayParser.js.map +1 -1
- package/dist/parser/parsers/ListToJsonParser.js +4 -7
- package/dist/parser/parsers/ListToJsonParser.js.map +1 -1
- package/dist/parser/parsers/ListToKeyValueParser.js +2 -6
- package/dist/parser/parsers/ListToKeyValueParser.js.map +1 -1
- package/dist/parser/parsers/MarkdownCodeBlock.js +4 -8
- package/dist/parser/parsers/MarkdownCodeBlock.js.map +1 -1
- package/dist/parser/parsers/MarkdownCodeBlocks.js +2 -6
- package/dist/parser/parsers/MarkdownCodeBlocks.js.map +1 -1
- package/dist/parser/parsers/NumberParser.js +4 -8
- package/dist/parser/parsers/NumberParser.js.map +1 -1
- package/dist/parser/parsers/ReplaceStringTemplateParser.js +4 -8
- package/dist/parser/parsers/ReplaceStringTemplateParser.js.map +1 -1
- package/dist/parser/parsers/StringExtractParser.d.ts +12 -0
- package/dist/parser/parsers/StringExtractParser.js +36 -0
- package/dist/parser/parsers/StringExtractParser.js.map +1 -0
- package/dist/parser/parsers/StringParser.js +4 -8
- package/dist/parser/parsers/StringParser.js.map +1 -1
- package/dist/plugins/callable/callable.d.ts +12 -0
- package/dist/plugins/callable/callable.js +30 -16
- package/dist/plugins/callable/callable.js.map +1 -1
- package/dist/plugins/callable/index.d.ts +4 -0
- package/dist/plugins/callable/index.js +6 -11
- package/dist/plugins/callable/index.js.map +1 -1
- package/dist/prompt/_base.d.ts +2 -2
- package/dist/prompt/_base.js +3 -7
- package/dist/prompt/_base.js.map +1 -1
- package/dist/prompt/_functions.js +7 -12
- package/dist/prompt/_functions.js.map +1 -1
- package/dist/prompt/chat.d.ts +10 -1
- package/dist/prompt/chat.js +80 -20
- package/dist/prompt/chat.js.map +1 -1
- package/dist/prompt/index.js +4 -12
- package/dist/prompt/index.js.map +1 -1
- package/dist/prompt/text.js +2 -6
- package/dist/prompt/text.js.map +1 -1
- package/dist/state/_base.js +11 -16
- package/dist/state/_base.js.map +1 -1
- package/dist/state/_functions.js +9 -15
- package/dist/state/_functions.js.map +1 -1
- package/dist/state/dialogue.d.ts +1 -0
- package/dist/state/dialogue.js +18 -6
- package/dist/state/dialogue.js.map +1 -1
- package/dist/state/index.js +4 -15
- package/dist/state/index.js.map +1 -1
- package/dist/state/item.js +4 -9
- package/dist/state/item.js.map +1 -1
- package/dist/types/index.js +1 -17
- package/dist/types/index.js.map +1 -1
- package/dist/utils/const.d.ts +3 -0
- package/dist/utils/const.js +4 -0
- package/dist/utils/const.js.map +1 -0
- package/dist/utils/index.js +1 -17
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/modules/asyncCallWithTimeout.js +1 -5
- package/dist/utils/modules/asyncCallWithTimeout.js.map +1 -1
- package/dist/utils/modules/handlebars/helpers/index.d.ts +1 -0
- package/dist/utils/modules/handlebars/helpers/index.js +12 -19
- package/dist/utils/modules/handlebars/helpers/index.js.map +1 -1
- package/dist/utils/modules/handlebars/index.js +12 -38
- package/dist/utils/modules/handlebars/index.js.map +1 -1
- package/dist/utils/modules/handlebars/templates/index.js +7 -10
- package/dist/utils/modules/handlebars/templates/index.js.map +1 -1
- package/dist/utils/modules/index.d.ts +10 -1
- package/dist/utils/modules/index.js +48 -50
- package/dist/utils/modules/index.js.map +1 -1
- package/dist/utils/modules/json-schema-filter.js +1 -5
- package/dist/utils/modules/json-schema-filter.js.map +1 -1
- package/dist/utils/modules/json.js +3 -9
- package/dist/utils/modules/json.js.map +1 -1
- package/dist/utils/modules/replaceTemplateString.js +3 -7
- package/dist/utils/modules/replaceTemplateString.js.map +1 -1
- package/dist/vector/base.js +1 -5
- package/dist/vector/base.js.map +1 -1
- package/dist/vector/index.js +2 -7
- package/dist/vector/index.js.map +1 -1
- package/dist/vector/pinecone.js +5 -8
- package/dist/vector/pinecone.js.map +1 -1
- package/package.json +22 -12
- package/readme.md +2 -0
|
@@ -1,29 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const uuid_1 = require("uuid");
|
|
15
|
-
Object.defineProperty(exports, "uuid", { enumerable: true, get: function () { return uuid_1.v4; } });
|
|
16
|
-
var json_schema_filter_1 = require("./json-schema-filter");
|
|
17
|
-
Object.defineProperty(exports, "filterObjectOnSchema", { enumerable: true, get: function () { return json_schema_filter_1.filterObjectOnSchema; } });
|
|
18
|
-
var replaceTemplateString_1 = require("./replaceTemplateString");
|
|
19
|
-
Object.defineProperty(exports, "replaceTemplateString", { enumerable: true, get: function () { return replaceTemplateString_1.replaceTemplateString; } });
|
|
20
|
-
var asyncCallWithTimeout_1 = require("./asyncCallWithTimeout");
|
|
21
|
-
Object.defineProperty(exports, "asyncCallWithTimeout", { enumerable: true, get: function () { return asyncCallWithTimeout_1.asyncCallWithTimeout; } });
|
|
22
|
-
var json_1 = require("./json");
|
|
23
|
-
Object.defineProperty(exports, "maybeStringifyJSON", { enumerable: true, get: function () { return json_1.maybeStringifyJSON; } });
|
|
24
|
-
Object.defineProperty(exports, "maybeParseJSON", { enumerable: true, get: function () { return json_1.maybeParseJSON; } });
|
|
25
|
-
Object.defineProperty(exports, "isObjectStringified", { enumerable: true, get: function () { return json_1.isObjectStringified; } });
|
|
26
|
-
function assert(condition, message) {
|
|
1
|
+
import { asConst } from "json-schema-to-ts";
|
|
2
|
+
import get from "lodash.get";
|
|
3
|
+
import set from "lodash.set";
|
|
4
|
+
import pick from "lodash.pick";
|
|
5
|
+
import camelCase from "lodash.camelcase";
|
|
6
|
+
import { v4 as uuidv4 } from "uuid";
|
|
7
|
+
export { uuidv4 as uuid };
|
|
8
|
+
export { get, set, pick, camelCase };
|
|
9
|
+
export { filterObjectOnSchema } from "./json-schema-filter";
|
|
10
|
+
export { replaceTemplateString } from "./replaceTemplateString";
|
|
11
|
+
export { asyncCallWithTimeout } from "./asyncCallWithTimeout";
|
|
12
|
+
export { maybeStringifyJSON, maybeParseJSON, isObjectStringified, } from "./json";
|
|
13
|
+
export function assert(condition, message) {
|
|
27
14
|
if (condition === undefined || condition === null || condition === false) {
|
|
28
15
|
if (typeof message === "string") {
|
|
29
16
|
throw new Error(message);
|
|
@@ -36,20 +23,17 @@ function assert(condition, message) {
|
|
|
36
23
|
}
|
|
37
24
|
}
|
|
38
25
|
}
|
|
39
|
-
|
|
40
|
-
const chunkArray = (arr, chunkSize) => arr.reduce((chunks, elem, index) => {
|
|
26
|
+
export const chunkArray = (arr, chunkSize) => arr.reduce((chunks, elem, index) => {
|
|
41
27
|
const chunkIndex = Math.floor(index / chunkSize);
|
|
42
28
|
const chunk = chunks[chunkIndex] || [];
|
|
43
29
|
chunks[chunkIndex] = chunk.concat([elem]);
|
|
44
30
|
return chunks;
|
|
45
31
|
}, []);
|
|
46
|
-
|
|
47
|
-
function defineSchema(obj) {
|
|
32
|
+
export function defineSchema(obj) {
|
|
48
33
|
obj.additionalProperties = false;
|
|
49
|
-
return
|
|
34
|
+
return asConst(obj);
|
|
50
35
|
}
|
|
51
|
-
|
|
52
|
-
function enforceResultAttributes(input) {
|
|
36
|
+
export function enforceResultAttributes(input) {
|
|
53
37
|
if (!input) {
|
|
54
38
|
return { result: input, attributes: {} };
|
|
55
39
|
}
|
|
@@ -63,8 +47,7 @@ function enforceResultAttributes(input) {
|
|
|
63
47
|
}
|
|
64
48
|
return { result: input, attributes: {} };
|
|
65
49
|
}
|
|
66
|
-
|
|
67
|
-
function ensureInputIsObject(input) {
|
|
50
|
+
export function ensureInputIsObject(input) {
|
|
68
51
|
if (input === null || typeof input === "undefined") {
|
|
69
52
|
return { input: input };
|
|
70
53
|
}
|
|
@@ -79,8 +62,7 @@ function ensureInputIsObject(input) {
|
|
|
79
62
|
return { input: input };
|
|
80
63
|
}
|
|
81
64
|
}
|
|
82
|
-
|
|
83
|
-
function inferFunctionName(func, defaultName) {
|
|
65
|
+
export function inferFunctionName(func, defaultName) {
|
|
84
66
|
const name = func?.name;
|
|
85
67
|
if (name && typeof name === "string") {
|
|
86
68
|
if (name.substring(0, 6) === "bound ") {
|
|
@@ -94,13 +76,11 @@ function inferFunctionName(func, defaultName) {
|
|
|
94
76
|
/* istanbul ignore next */
|
|
95
77
|
return result ? result[1] : defaultName;
|
|
96
78
|
}
|
|
97
|
-
|
|
98
|
-
function removeEmptyFromObject(obj) {
|
|
79
|
+
export function removeEmptyFromObject(obj) {
|
|
99
80
|
assert(typeof obj === "object", "invalid object");
|
|
100
81
|
return Object.fromEntries(Object.entries(obj).filter(([_, v]) => !isNull(v) && !isUndefined(v)));
|
|
101
82
|
}
|
|
102
|
-
|
|
103
|
-
function generateUniqueNameId(prefix = "", suffix = "") {
|
|
83
|
+
export function generateUniqueNameId(prefix = "", suffix = "") {
|
|
104
84
|
//https://stackoverflow.com/questions/6248666/how-to-generate-short-uid-like-ax4j9z-in-js
|
|
105
85
|
const _firstPart = (Math.random() * 46656) | 0;
|
|
106
86
|
const _secondPart = (Math.random() * 46656) | 0;
|
|
@@ -108,20 +88,16 @@ function generateUniqueNameId(prefix = "", suffix = "") {
|
|
|
108
88
|
const secondPart = ("000" + _secondPart.toString(36)).slice(-3);
|
|
109
89
|
return `${prefix}${firstPart}${secondPart}${suffix}`;
|
|
110
90
|
}
|
|
111
|
-
|
|
112
|
-
function isNull(value) {
|
|
91
|
+
export function isNull(value) {
|
|
113
92
|
return Object.is(value, null);
|
|
114
93
|
}
|
|
115
|
-
|
|
116
|
-
function isUndefined(value) {
|
|
94
|
+
export function isUndefined(value) {
|
|
117
95
|
return value === undefined || typeof value === undefined;
|
|
118
96
|
}
|
|
119
|
-
|
|
120
|
-
function isFinite(value) {
|
|
97
|
+
export function isFinite(value) {
|
|
121
98
|
return typeof value === "number" && Number.isFinite(value);
|
|
122
99
|
}
|
|
123
|
-
|
|
124
|
-
function toNumber(value) {
|
|
100
|
+
export function toNumber(value) {
|
|
125
101
|
if (typeof value === "number") {
|
|
126
102
|
return value;
|
|
127
103
|
}
|
|
@@ -130,5 +106,27 @@ function toNumber(value) {
|
|
|
130
106
|
}
|
|
131
107
|
return NaN;
|
|
132
108
|
}
|
|
133
|
-
|
|
109
|
+
export function extractPromptPlaceholderToken(tok) {
|
|
110
|
+
if (!tok)
|
|
111
|
+
return { token: "" };
|
|
112
|
+
const token = tok.replace(/ /g, "");
|
|
113
|
+
if (token.substring(2, 18) === ">DialogueHistory") {
|
|
114
|
+
const matchKey = tok.match(/key=(['"`])((?:(?!\1).)*)\1/);
|
|
115
|
+
if (matchKey) {
|
|
116
|
+
return {
|
|
117
|
+
token: ">DialogueHistory",
|
|
118
|
+
key: matchKey[2],
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return { token: "" };
|
|
123
|
+
}
|
|
124
|
+
export function getEnvironmentVariable(name) {
|
|
125
|
+
if (typeof process === "object" && process?.env) {
|
|
126
|
+
return process.env[name];
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
return undefined;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
134
132
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["utils/modules/index.ts"],"names":[],"mappings":"
|
|
1
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,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACpC,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,kBAAkB,EAAE;QACjD,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;QAC1D,IAAI,QAAQ,EAAE;YACZ,OAAO;gBACL,KAAK,EAAE,kBAAkB;gBACzB,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;aACjB,CAAC;SACH;KACF;IACD,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;AACvB,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,IAAY;IACjD,IAAG,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,EAAE,GAAG,EAAC;QAC7C,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;KACzB;SAAI;QACH,OAAO,SAAS,CAAA;KACjB;AACH,CAAC"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.filterObjectOnSchema = void 0;
|
|
4
1
|
function isObject(obj) {
|
|
5
2
|
return obj === Object(obj);
|
|
6
3
|
}
|
|
@@ -18,7 +15,7 @@ function getType(schemaType) {
|
|
|
18
15
|
}
|
|
19
16
|
}
|
|
20
17
|
}
|
|
21
|
-
function filterObjectOnSchema(schema, doc, detach) {
|
|
18
|
+
export function filterObjectOnSchema(schema, doc, detach) {
|
|
22
19
|
let result; // returns the resulting filtered thing from this level; can be object, array, literal, ...
|
|
23
20
|
// if the document is null/undefined, short-circuit and return it
|
|
24
21
|
if (doc === null || doc === undefined) {
|
|
@@ -65,5 +62,4 @@ function filterObjectOnSchema(schema, doc, detach) {
|
|
|
65
62
|
}
|
|
66
63
|
return result;
|
|
67
64
|
}
|
|
68
|
-
exports.filterObjectOnSchema = filterObjectOnSchema;
|
|
69
65
|
//# sourceMappingURL=json-schema-filter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-schema-filter.js","sourceRoot":"src/","sources":["utils/modules/json-schema-filter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"json-schema-filter.js","sourceRoot":"src/","sources":["utils/modules/json-schema-filter.ts"],"names":[],"mappings":"AAAA,SAAS,QAAQ,CAAC,GAAQ;IACxB,OAAO,GAAG,KAAK,MAAM,CAAC,GAAG,CAAC,CAAC;AAC7B,CAAC;AAED,SAAS,OAAO,CAAC,UAAe;IAC9B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;QAC9B,OAAO,UAAU,CAAC;KACnB;IAED,wCAAwC;IACxC,sEAAsE;IACtE,IAAI,SAAS,GAAG,UAAU,CAAC;IAC3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACzC,IAAI,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;QACxB,IAAI,IAAI,KAAK,MAAM,EAAE;YACnB,OAAO,IAAI,CAAC;SACb;KACF;AACH,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,MAAW,EAAE,GAAQ,EAAE,MAAY;IACtE,IAAI,MAAW,CAAC,CAAC,2FAA2F;IAE5G,iEAAiE;IACjE,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,EAAE;QACrC,OAAO,GAAG,CAAC;KACZ;IAED,sDAAsD;IACtD,IAAI,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAChC,IAAI,IAAI,KAAK,QAAQ,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,UAAU,EAAE;QAC3D,MAAM,GAAG,EAAE,CAAC,CAAC,0DAA0D;QAEvE,iCAAiC;QACjC,MAAM,CAAC,IAAI,CAAC,MAAM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ybeStringifyJSON = void 0;
|
|
4
|
-
const maybeStringifyJSON = (objOrMaybeString) => {
|
|
1
|
+
export const maybeStringifyJSON = (objOrMaybeString) => {
|
|
5
2
|
if (!objOrMaybeString || typeof objOrMaybeString !== "object") {
|
|
6
3
|
return objOrMaybeString;
|
|
7
4
|
}
|
|
@@ -12,8 +9,7 @@ const maybeStringifyJSON = (objOrMaybeString) => {
|
|
|
12
9
|
catch (error) { }
|
|
13
10
|
return "";
|
|
14
11
|
};
|
|
15
|
-
|
|
16
|
-
const maybeParseJSON = (objOrMaybeJSON) => {
|
|
12
|
+
export const maybeParseJSON = (objOrMaybeJSON) => {
|
|
17
13
|
if (!objOrMaybeJSON)
|
|
18
14
|
return {};
|
|
19
15
|
if (typeof objOrMaybeJSON === "string") {
|
|
@@ -32,8 +28,7 @@ const maybeParseJSON = (objOrMaybeJSON) => {
|
|
|
32
28
|
}
|
|
33
29
|
return {};
|
|
34
30
|
};
|
|
35
|
-
|
|
36
|
-
function isObjectStringified(maybeObject) {
|
|
31
|
+
export function isObjectStringified(maybeObject) {
|
|
37
32
|
if (typeof maybeObject !== "string")
|
|
38
33
|
return false;
|
|
39
34
|
const isMaybeObject = maybeObject.substring(0, 1) === "{" &&
|
|
@@ -53,5 +48,4 @@ function isObjectStringified(maybeObject) {
|
|
|
53
48
|
}
|
|
54
49
|
return canDecode;
|
|
55
50
|
}
|
|
56
|
-
exports.isObjectStringified = isObjectStringified;
|
|
57
51
|
//# sourceMappingURL=json.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.js","sourceRoot":"src/","sources":["utils/modules/json.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"json.js","sourceRoot":"src/","sources":["utils/modules/json.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,gBAAqB,EAAU,EAAE;IAClE,IAAI,CAAC,gBAAgB,IAAI,OAAO,gBAAgB,KAAK,QAAQ,EAAE;QAC7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,CAAC,aAAa,IAAI,CAAC,YAAY,EAAE;QACnC,OAAO,KAAK,CAAC;KACd;IAED,IAAI,SAAS,GAAG,KAAK,CAAC;IACtB,IAAI;QACF,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QACxB,SAAS,GAAG,IAAI,CAAC;KAClB;IAAC,OAAO,KAAK,EAAE;QACd,SAAS,GAAG,KAAK,CAAC;KACnB;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.replaceTemplateString = void 0;
|
|
4
|
-
const handlebars_1 = require("./handlebars");
|
|
5
|
-
function replaceTemplateString(templateString, substitutions = {}, configuration = {
|
|
1
|
+
import { useHandlebars } from "./handlebars";
|
|
2
|
+
export function replaceTemplateString(templateString, substitutions = {}, configuration = {
|
|
6
3
|
helpers: [],
|
|
7
4
|
partials: [],
|
|
8
5
|
}) {
|
|
9
6
|
if (!templateString)
|
|
10
7
|
return templateString || "";
|
|
11
|
-
const hbs =
|
|
8
|
+
const hbs = useHandlebars(configuration);
|
|
12
9
|
const template = hbs.compile(templateString);
|
|
13
10
|
const res = template(substitutions, {
|
|
14
11
|
allowedProtoMethods: {
|
|
@@ -17,5 +14,4 @@ function replaceTemplateString(templateString, substitutions = {}, configuration
|
|
|
17
14
|
});
|
|
18
15
|
return res;
|
|
19
16
|
}
|
|
20
|
-
exports.replaceTemplateString = replaceTemplateString;
|
|
21
17
|
//# sourceMappingURL=replaceTemplateString.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replaceTemplateString.js","sourceRoot":"src/","sources":["utils/modules/replaceTemplateString.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"replaceTemplateString.js","sourceRoot":"src/","sources":["utils/modules/replaceTemplateString.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,UAAU,qBAAqB,CACnC,cAAuB,EACvB,gBAAqC,EAAE,EACvC,gBAAuC;IACrC,OAAO,EAAE,EAAE;IACX,QAAQ,EAAE,EAAE;CACb;IAED,IAAI,CAAC,cAAc;QAAE,OAAO,cAAc,IAAI,EAAE,CAAC;IAEjD,MAAM,GAAG,GAAG,aAAa,CAAC,aAAa,CAAC,CAAC;IACzC,MAAM,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IAC7C,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,EAAE;QAClC,mBAAmB,EAAE;YACnB,SAAS,EAAE,IAAI;SAChB;KACF,CAAC,CAAC;IACH,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/vector/base.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BaseVectorStore = void 0;
|
|
4
|
-
class BaseVectorStore {
|
|
1
|
+
export class BaseVectorStore {
|
|
5
2
|
constructor(client) {
|
|
6
3
|
Object.defineProperty(this, "client", {
|
|
7
4
|
enumerable: true,
|
|
@@ -19,5 +16,4 @@ class BaseVectorStore {
|
|
|
19
16
|
similaritySearch() { }
|
|
20
17
|
similaritySearchWithScore() { }
|
|
21
18
|
}
|
|
22
|
-
exports.BaseVectorStore = BaseVectorStore;
|
|
23
19
|
//# sourceMappingURL=base.js.map
|
package/dist/vector/base.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sourceRoot":"src/","sources":["vector/base.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"src/","sources":["vector/base.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,eAAe;IAG1B,YAAY,MAAW;QAFvB;;;;;WAAmB;QAGjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IACD,KAAK,CAAC,UAAU,KAAI,CAAC;IACrB,SAAS,KAAI,CAAC;IACd,aAAa,KAAI,CAAC;IAClB,UAAU,KAAI,CAAC;IACf,YAAY,KAAI,CAAC;IACjB,gBAAgB,KAAI,CAAC;IACrB,yBAAyB,KAAI,CAAC;CAC/B"}
|
package/dist/vector/index.js
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.PineconeVectorStore = exports.BaseVectorStore = void 0;
|
|
4
|
-
var base_1 = require("./base");
|
|
5
|
-
Object.defineProperty(exports, "BaseVectorStore", { enumerable: true, get: function () { return base_1.BaseVectorStore; } });
|
|
6
|
-
var pinecone_1 = require("./pinecone");
|
|
7
|
-
Object.defineProperty(exports, "PineconeVectorStore", { enumerable: true, get: function () { return pinecone_1.PineconeVectorStore; } });
|
|
1
|
+
export { BaseVectorStore } from "./base";
|
|
2
|
+
export { PineconeVectorStore } from "./pinecone";
|
|
8
3
|
//# sourceMappingURL=index.js.map
|
package/dist/vector/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["vector/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["vector/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/vector/pinecone.js
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const base_1 = require("./base");
|
|
5
|
-
class PineconeVectorStore extends base_1.BaseVectorStore {
|
|
1
|
+
import { getEnvironmentVariable } from "../utils";
|
|
2
|
+
import { BaseVectorStore } from "./base";
|
|
3
|
+
export class PineconeVectorStore extends BaseVectorStore {
|
|
6
4
|
constructor(client) {
|
|
7
5
|
super(client);
|
|
8
6
|
this.client = new client();
|
|
9
7
|
}
|
|
10
8
|
async initialize() {
|
|
11
9
|
await this.client.init({
|
|
12
|
-
environment:
|
|
13
|
-
apiKey:
|
|
10
|
+
environment: getEnvironmentVariable("PINECONE_CLIENT_ENVIRONMENT"),
|
|
11
|
+
apiKey: getEnvironmentVariable("PINECONE_CLIENT_API_KEY")
|
|
14
12
|
});
|
|
15
13
|
}
|
|
16
14
|
async useIndex(indexName) {
|
|
@@ -18,5 +16,4 @@ class PineconeVectorStore extends base_1.BaseVectorStore {
|
|
|
18
16
|
return this.client.Index(indexName);
|
|
19
17
|
}
|
|
20
18
|
}
|
|
21
|
-
exports.PineconeVectorStore = PineconeVectorStore;
|
|
22
19
|
//# sourceMappingURL=pinecone.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pinecone.js","sourceRoot":"src/","sources":["vector/pinecone.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pinecone.js","sourceRoot":"src/","sources":["vector/pinecone.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzC,MAAM,OAAO,mBAAoB,SAAQ,eAAe;IACtD,YAAY,MAAW;QACrB,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;IAC7B,CAAC;IACD,KAAK,CAAC,UAAU;QACd,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;YACrB,WAAW,EAAE,sBAAsB,CAAC,6BAA6B,CAAC;YAClE,MAAM,EAAE,sBAAsB,CAAC,yBAAyB,CAAC;SAC1D,CAAC,CAAC;IACL,CAAC;IACD,KAAK,CAAC,QAAQ,CAAC,SAAiB;QAC9B,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;QACxB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACtC,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "llm-exe",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "A package that provides simplified base components to make building and maintaining LLM-powered applications easier.",
|
|
5
|
-
"keywords": [
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ai",
|
|
7
|
+
"llm",
|
|
8
|
+
"openai",
|
|
9
|
+
"gpt-3.5-turbo",
|
|
10
|
+
"gpt-4",
|
|
11
|
+
"chain",
|
|
12
|
+
"prompt"
|
|
13
|
+
],
|
|
6
14
|
"main": "dist/index.js",
|
|
7
15
|
"types": "dist/index.d.ts",
|
|
8
16
|
"files": [
|
|
@@ -12,11 +20,11 @@
|
|
|
12
20
|
"node": ">=18"
|
|
13
21
|
},
|
|
14
22
|
"scripts": {
|
|
15
|
-
"tsc": "tsc --project ./tsconfig.json
|
|
16
|
-
"tsc-ci": "tsc --project ./tsconfig.json && tsc-alias",
|
|
23
|
+
"tsc": "tsc --project ./tsconfig.json &&& tsc-alias -p ./tsconfig.json -w",
|
|
24
|
+
"tsc-ci": "tsc --project ./tsconfig.json && tsc-alias -p ./tsconfig.json",
|
|
17
25
|
"tsc-build": "tsc --project ./tsconfig-build.json && tsc-alias -p tsconfig-build.json -w",
|
|
18
|
-
"test": "NODE_OPTIONS=--experimental-vm-modules jest --detectOpenHandles --coverage --forceExit
|
|
19
|
-
"docs:dev": "vuepress dev docs",
|
|
26
|
+
"test": "NODE_OPTIONS=--experimental-vm-modules jest --detectOpenHandles --coverage --forceExit",
|
|
27
|
+
"docs:dev": "vuepress dev docs --clean-temp --clean-cache ",
|
|
20
28
|
"docs:build": "vuepress build docs",
|
|
21
29
|
"lint": "eslint",
|
|
22
30
|
"format:check": "prettier --check \"src\"",
|
|
@@ -25,11 +33,13 @@
|
|
|
25
33
|
"author": "Greg Reindel",
|
|
26
34
|
"license": "MIT",
|
|
27
35
|
"dependencies": {
|
|
36
|
+
"@types/lodash.camelcase": "^4.3.7",
|
|
28
37
|
"exponential-backoff": "3.1.1",
|
|
29
38
|
"handlebars": "4.7.7",
|
|
30
39
|
"json-schema-defaults": "0.4.0",
|
|
31
40
|
"json-schema-to-ts": "^2.8.2",
|
|
32
41
|
"jsonschema": "1.4.1",
|
|
42
|
+
"lodash.camelcase": "^4.3.0",
|
|
33
43
|
"lodash.get": "^4.4.2",
|
|
34
44
|
"lodash.pick": "^4.4.0",
|
|
35
45
|
"lodash.set": "^4.3.2",
|
|
@@ -39,23 +49,23 @@
|
|
|
39
49
|
},
|
|
40
50
|
"devDependencies": {
|
|
41
51
|
"@tsconfig/recommended": "^1.0.2",
|
|
42
|
-
"@types/jest": "^
|
|
52
|
+
"@types/jest": "^29.5.2",
|
|
43
53
|
"@types/json-schema": "^7.0.11",
|
|
44
54
|
"@types/lodash.get": "^4.4.7",
|
|
45
|
-
"eslint": "^8.41.0",
|
|
46
55
|
"@types/lodash.pick": "^4.4.7",
|
|
47
56
|
"@types/lodash.set": "^4.3.7",
|
|
48
57
|
"@types/node": "17.0.23",
|
|
49
58
|
"@types/prettier": "2.6.0",
|
|
50
59
|
"@types/uuid": "^9.0.1",
|
|
60
|
+
"@vuepress/plugin-google-analytics": "^2.0.0-beta.62",
|
|
61
|
+
"eslint": "^8.41.0",
|
|
51
62
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
52
63
|
"eslint-config-prettier": "^8.8.0",
|
|
53
|
-
"@vuepress/plugin-google-analytics": "^2.0.0-beta.62",
|
|
54
|
-
"jest": "^27.5.1",
|
|
55
64
|
"eslint-plugin-prettier": "^4.2.1",
|
|
56
|
-
"
|
|
57
|
-
"ts-node": "^10.9.1",
|
|
65
|
+
"jest": "^29.5.0",
|
|
58
66
|
"prettier": "^2.8.8",
|
|
67
|
+
"ts-jest": "^29.1.0",
|
|
68
|
+
"ts-node": "^10.9.1",
|
|
59
69
|
"tsc-alias": "^1.6.6",
|
|
60
70
|
"tsconfig-paths": "^3.14.1",
|
|
61
71
|
"typescript": "^4.8.4",
|
package/readme.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# llm-exe
|
|
2
2
|
|
|
3
|
+
[](https://github.com/gregreindel/llm-exe/actions/workflows/node.js.yml) [](https://coveralls.io/github/gregreindel/llm-exe?branch=main) [](https://badge.fury.io/js/llm-exe)
|
|
4
|
+
|
|
3
5
|
A package that provides simplified base components to make building and maintaining LLM-powered applications easier.
|
|
4
6
|
|
|
5
7
|
- Write functions powered by LLM's with easy to use building blocks.
|