@promptbook/remote-server 0.52.0-9 → 0.52.0
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/README.md +1 -13
- package/esm/index.es.js +2 -1
- package/esm/index.es.js.map +1 -1
- package/esm/typings/_packages/core.index.d.ts +4 -2
- package/esm/typings/_packages/utils.index.d.ts +2 -0
- package/esm/typings/errors/PromptbookLibraryError.d.ts +7 -0
- package/esm/typings/execution/ExecutionTools.d.ts +5 -3
- package/esm/typings/execution/plugins/llm-execution-tools/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +0 -1
- package/esm/typings/execution/plugins/llm-execution-tools/azure-openai/AzureOpenAiExecutionTools.d.ts +0 -1
- package/esm/typings/execution/plugins/llm-execution-tools/langtail/LangtailExecutionTools.d.ts +0 -3
- package/esm/typings/execution/plugins/llm-execution-tools/openai/OpenAiExecutionTools.d.ts +1 -1
- package/esm/typings/execution/plugins/llm-execution-tools/remote/RemoteLlmExecutionTools.d.ts +1 -1
- package/esm/typings/execution/plugins/llm-execution-tools/remote/startRemoteServer.d.ts +1 -0
- package/esm/typings/execution/utils/forEachAsync.d.ts +18 -0
- package/esm/typings/library/constructors/createPromptbookLibraryFromDirectory.d.ts +28 -4
- package/esm/typings/library/constructors/createPromptbookLibraryFromDirectory.test.d.ts +1 -0
- package/esm/typings/library/constructors/createPromptbookLibraryFromPromise.d.ts +2 -2
- package/esm/typings/library/constructors/createPromptbookLibraryFromPromise.test.d.ts +1 -0
- package/esm/typings/library/constructors/createPromptbookLibraryFromSources.test.d.ts +1 -0
- package/esm/typings/library/constructors/createPromptbookLibraryFromUrl.d.ts +22 -5
- package/esm/typings/library/constructors/justTestFsImport.d.ts +7 -0
- package/esm/typings/types/Prompt.d.ts +1 -1
- package/esm/typings/types/typeAliases.d.ts +2 -2
- package/package.json +3 -3
- package/umd/index.umd.js +2 -1
- package/umd/index.umd.js.map +1 -1
- package/umd/typings/_packages/core.index.d.ts +4 -2
- package/umd/typings/_packages/utils.index.d.ts +2 -0
- package/umd/typings/errors/PromptbookLibraryError.d.ts +7 -0
- package/umd/typings/execution/ExecutionTools.d.ts +5 -3
- package/umd/typings/execution/plugins/llm-execution-tools/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +0 -1
- package/umd/typings/execution/plugins/llm-execution-tools/azure-openai/AzureOpenAiExecutionTools.d.ts +0 -1
- package/umd/typings/execution/plugins/llm-execution-tools/langtail/LangtailExecutionTools.d.ts +0 -3
- package/umd/typings/execution/plugins/llm-execution-tools/openai/OpenAiExecutionTools.d.ts +1 -1
- package/umd/typings/execution/plugins/llm-execution-tools/remote/RemoteLlmExecutionTools.d.ts +1 -1
- package/umd/typings/execution/plugins/llm-execution-tools/remote/startRemoteServer.d.ts +1 -0
- package/umd/typings/execution/utils/forEachAsync.d.ts +18 -0
- package/umd/typings/library/constructors/createPromptbookLibraryFromDirectory.d.ts +28 -4
- package/umd/typings/library/constructors/createPromptbookLibraryFromDirectory.test.d.ts +1 -0
- package/umd/typings/library/constructors/createPromptbookLibraryFromPromise.d.ts +2 -2
- package/umd/typings/library/constructors/createPromptbookLibraryFromPromise.test.d.ts +1 -0
- package/umd/typings/library/constructors/createPromptbookLibraryFromSources.test.d.ts +1 -0
- package/umd/typings/library/constructors/createPromptbookLibraryFromUrl.d.ts +22 -5
- package/umd/typings/library/constructors/justTestFsImport.d.ts +7 -0
- package/umd/typings/types/Prompt.d.ts +1 -1
- package/umd/typings/types/typeAliases.d.ts +2 -2
- package/esm/typings/wizzard/Wizzard.d.ts +0 -4
- package/esm/typings/wizzard/sample.d.ts +0 -6
- package/umd/typings/wizzard/Wizzard.d.ts +0 -4
- package/umd/typings/wizzard/sample.d.ts +0 -6
package/README.md
CHANGED
|
@@ -11,7 +11,6 @@ Library to supercharge your use of large language models
|
|
|
11
11
|
[](https://github.com/webgptorg/promptbook/issues)
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
[](https://socket.dev/npm/package/@promptbook/remote-server)
|
|
15
14
|
|
|
16
15
|
|
|
17
16
|
|
|
@@ -70,15 +69,6 @@ In any of these situations, but especially in (3), the Promptbook library can ma
|
|
|
70
69
|
- _(Not ready yet)_ Leverage the **streaming** to make super cool UI/UX.
|
|
71
70
|
- _(Not ready yet)_ **A/B testing** to determine which prompt works best for the job.
|
|
72
71
|
|
|
73
|
-

|
|
74
|
-
|
|
75
|
-
## 🧔 Promptbook _(for prompt-engeneers)_
|
|
76
|
-
|
|
77
|
-
**P**romp**t** **b**oo**k** markdown file (**PTBK** for short, or `.ptbk.md`) is document that describes a series of prompts that are chained together to form somewhat reciepe for transforming natural language input. Inside a PTBK you can use chat prompts, completion prompts, scripting or trigger interaction with user to ask for additional information.
|
|
78
|
-
|
|
79
|
-
- Multiple promptbooks forms a library which will become a **part of your application codebase**.
|
|
80
|
-
- Theese promptbooks are designed such as they **can be written by non-programmers**.
|
|
81
|
-
|
|
82
72
|
|
|
83
73
|
|
|
84
74
|
### Sample:
|
|
@@ -91,7 +81,7 @@ File `write-website-content.ptbk.md`:
|
|
|
91
81
|
>
|
|
92
82
|
> Instructions for creating web page content.
|
|
93
83
|
>
|
|
94
|
-
> - PROMPTBOOK URL https://promptbook.webgpt.com/en/write-website-content.ptbk.md
|
|
84
|
+
> - PROMPTBOOK URL https://promptbook.webgpt.com/en/write-website-content.ptbk.md
|
|
95
85
|
> - PROMPTBOOK VERSION 0.0.1
|
|
96
86
|
> - INPUT PARAM `{rawTitle}` Automatically suggested a site name or empty text
|
|
97
87
|
> - INPUT PARAM `{rawAssigment}` Automatically generated site entry from image recognition
|
|
@@ -550,8 +540,6 @@ _Note: LLMs work with tokens, not characters, but in Promptbooks we want to use
|
|
|
550
540
|
```markdown
|
|
551
541
|
# ✨ Sample: Expectations
|
|
552
542
|
|
|
553
|
-
- PROMPTBOOK URL https://promptbook.example.com/samples/postprocessing-2.ptbk.md@v1
|
|
554
|
-
- PROMPTBOOK VERSION 1.0.0
|
|
555
543
|
- INPUT PARAMETER {yourName} Name of the hero
|
|
556
544
|
|
|
557
545
|
## 💬 Question
|
package/esm/index.es.js
CHANGED
|
@@ -89,7 +89,7 @@ var PromptbookExecutionError = /** @class */ (function (_super) {
|
|
|
89
89
|
/**
|
|
90
90
|
* The version of the Promptbook library
|
|
91
91
|
*/
|
|
92
|
-
var PROMPTBOOK_VERSION = '0.52.0-
|
|
92
|
+
var PROMPTBOOK_VERSION = '0.52.0-33';
|
|
93
93
|
|
|
94
94
|
/**
|
|
95
95
|
* Remote server is a proxy server that uses its execution tools internally and exposes the executor interface externally.
|
|
@@ -204,6 +204,7 @@ function startRemoteServer(options) {
|
|
|
204
204
|
};
|
|
205
205
|
}
|
|
206
206
|
/**
|
|
207
|
+
* TODO: [⚖] Expose the library to be able to connect to same library via createPromptbookLibraryFromUrl
|
|
207
208
|
* TODO: Handle progress - support streaming
|
|
208
209
|
* TODO: [🤹♂️] Do not hang up immediately but wait until client closes OR timeout
|
|
209
210
|
* TODO: [🤹♂️] Timeout on chat to free up resources
|
package/esm/index.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../../node_modules/tslib/tslib.es6.js","../../../src/errors/PromptbookExecutionError.ts","../../../src/version.ts","../../../src/execution/plugins/llm-execution-tools/remote/startRemoteServer.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n",null,null,null],"names":[],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;AACnC,IAAI,aAAa,GAAG,MAAM,CAAC,cAAc;AACzC,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;AACpF,QAAQ,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC1G,IAAI,OAAO,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC/B,CAAC,CAAC;AACF;AACO,SAAS,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE;AAChC,IAAI,IAAI,OAAO,CAAC,KAAK,UAAU,IAAI,CAAC,KAAK,IAAI;AAC7C,QAAQ,MAAM,IAAI,SAAS,CAAC,sBAAsB,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,+BAA+B,CAAC,CAAC;AAClG,IAAI,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAA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IAAI,WAAW,GAAG,KAAK,CAAC;IAExB,OAAO;QACH,IAAI,WAAW;YACX,OAAO,WAAW,CAAC;SACtB;QACD,OAAO;YACH,IAAI,WAAW,EAAE;gBACb,OAAO;aACV;YACD,WAAW,GAAG,IAAI,CAAC;YACnB,UAAU,CAAC,KAAK,EAAE,CAAC;YACnB,MAAM,CAAC,KAAK,EAAE,CAAC;SAClB;KACJ,CAAC;AACN,CAAC;AAED;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../../../node_modules/tslib/tslib.es6.js","../../../src/errors/PromptbookExecutionError.ts","../../../src/version.ts","../../../src/execution/plugins/llm-execution-tools/remote/startRemoteServer.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n",null,null,null],"names":[],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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aceTools } from '../execution/plugins/user-interface-execution-tools/simple-prompt/SimplePromptInterfaceTools';
|
|
11
11
|
import { checkExpectations, isPassingExpectations } from '../execution/utils/checkExpectations';
|
|
12
12
|
import { createPromptbookLibraryFromDirectory } from '../library/constructors/createPromptbookLibraryFromDirectory';
|
|
13
|
-
import { createPromptbookLibraryFromPromise } from '../library/constructors/createPromptbookLibraryFromPromise';
|
|
14
13
|
import { createPromptbookLibraryFromSources } from '../library/constructors/createPromptbookLibraryFromSources';
|
|
14
|
+
import { createPromptbookLibraryFromUrl } from '../library/constructors/createPromptbookLibraryFromUrl';
|
|
15
15
|
import { createPromptbookSublibrary } from '../library/constructors/createPromptbookSublibrary';
|
|
16
|
+
import { justTestFsImport } from '../library/constructors/justTestFsImport';
|
|
16
17
|
import { SimplePromptbookLibrary } from '../library/SimplePromptbookLibrary';
|
|
17
18
|
import { executionReportJsonToString } from '../types/execution-report/executionReportJsonToString';
|
|
18
19
|
import { ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults } from '../types/execution-report/ExecutionReportStringOptions';
|
|
19
20
|
import { ExecutionTypes } from '../types/ExecutionTypes';
|
|
20
21
|
import { PROMPTBOOK_VERSION } from '../version';
|
|
22
|
+
export { justTestFsImport };
|
|
21
23
|
export { ExecutionTypes, PROMPTBOOK_VERSION };
|
|
22
24
|
export { assertsExecutionSuccessful, checkExpectations, executionReportJsonToString, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, isPassingExpectations, prettifyPromptbookString, };
|
|
23
|
-
export { createPromptbookLibraryFromDirectory,
|
|
25
|
+
export { createPromptbookLibraryFromDirectory, createPromptbookLibraryFromSources, createPromptbookLibraryFromUrl, createPromptbookSublibrary, SimplePromptbookLibrary, };
|
|
24
26
|
export { SimplePromptInterfaceTools };
|
|
25
27
|
export { promptbookJsonToString, promptbookStringToJson, validatePromptbookJson };
|
|
26
28
|
export { createPromptbookExecutor, MultipleLlmExecutionTools };
|
|
@@ -5,6 +5,7 @@ import { extractVariables } from '../conversion/utils/extractVariables';
|
|
|
5
5
|
import { parseNumber } from '../conversion/utils/parseNumber';
|
|
6
6
|
import { renameParameter } from '../conversion/utils/renameParameter';
|
|
7
7
|
import { titleToName } from '../conversion/utils/titleToName';
|
|
8
|
+
import { forEachAsync } from '../execution/utils/forEachAsync';
|
|
8
9
|
import { replaceParameters } from '../execution/utils/replaceParameters';
|
|
9
10
|
import { CountUtils } from '../utils/expectation-counters';
|
|
10
11
|
import { countCharacters } from '../utils/expectation-counters/countCharacters';
|
|
@@ -46,6 +47,7 @@ import { union } from '../utils/sets/union';
|
|
|
46
47
|
import { trimCodeBlock } from '../utils/trimCodeBlock';
|
|
47
48
|
import { trimEndOfCodeBlock } from '../utils/trimEndOfCodeBlock';
|
|
48
49
|
import { unwrapResult } from '../utils/unwrapResult';
|
|
50
|
+
export { forEachAsync };
|
|
49
51
|
export { extractAllBlocksFromMarkdown, // <- [🌻]
|
|
50
52
|
extractAllListItemsFromMarkdown, extractBlock, // <- [🌻]
|
|
51
53
|
extractOneBlockFromMarkdown, extractParameters, extractVariables, isValidJsonString, parseNumber, // <- [🌻]
|
|
@@ -9,6 +9,9 @@ import type { UserInterfaceTools } from './UserInterfaceTools';
|
|
|
9
9
|
export type ExecutionTools = {
|
|
10
10
|
/**
|
|
11
11
|
* Tools for executing prompts to large language models like GPT-4
|
|
12
|
+
*
|
|
13
|
+
* Tip: Combine multiple LLM execution tools with `MultipleLlmExecutionTools`
|
|
14
|
+
* @see https://github.com/webgptorg/promptbook/?tab=readme-ov-file#llm-execution-tools
|
|
12
15
|
*/
|
|
13
16
|
llm: LlmExecutionTools;
|
|
14
17
|
/**
|
|
@@ -16,15 +19,14 @@ export type ExecutionTools = {
|
|
|
16
19
|
*
|
|
17
20
|
* Note: You can pass multiple ScriptExecutionTools, they will be tried one by one until one of them supports the script
|
|
18
21
|
* If none of them supports the script, an error is thrown
|
|
22
|
+
* @see https://github.com/webgptorg/promptbook/?tab=readme-ov-file#script-execution-tools
|
|
19
23
|
*/
|
|
20
24
|
script: Array<ScriptExecutionTools>;
|
|
21
25
|
/**
|
|
22
26
|
* Tools for interacting with the user
|
|
23
27
|
*
|
|
24
28
|
* Note: When undefined, the user interface is disabled and promptbook which requires user interaction will fail
|
|
29
|
+
* @see https://github.com/webgptorg/promptbook/?tab=readme-ov-file#user-interface-tools
|
|
25
30
|
*/
|
|
26
31
|
userInterface?: UserInterfaceTools;
|
|
27
32
|
};
|
|
28
|
-
/**
|
|
29
|
-
* TODO: [🍓] !!!! Allow to have more LlmExecutionTools
|
|
30
|
-
*/
|
|
@@ -36,7 +36,6 @@ export declare class AnthropicClaudeExecutionTools implements LlmExecutionTools
|
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
38
|
* TODO: [🧠] Maybe handle errors via transformAnthropicError (like transformAzureError)
|
|
39
|
-
* TODO: [🍓][♐] Allow to list compatible models with each variant
|
|
40
39
|
* TODO: Maybe Create some common util for gptChat and gptComplete
|
|
41
40
|
* TODO: Maybe make custom OpenaiError
|
|
42
41
|
*/
|
|
@@ -35,7 +35,6 @@ export declare class AzureOpenAiExecutionTools implements LlmExecutionTools {
|
|
|
35
35
|
listModels(): Promise<Array<AvailableModel>>;
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
|
-
* TODO: [🍓][♐] Allow to list compatible models with each variant
|
|
39
38
|
* TODO: Maybe Create some common util for gptChat and gptComplete
|
|
40
39
|
* TODO: Maybe make custom AzureOpenaiError
|
|
41
40
|
*/
|
|
@@ -39,7 +39,7 @@ export declare class OpenAiExecutionTools implements LlmExecutionTools {
|
|
|
39
39
|
listModels(): Array<AvailableModel>;
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
|
-
* TODO: [
|
|
42
|
+
* TODO: [🧠][🧙♂️] Maybe there can be some wizzard for thoose who want to use just OpenAI
|
|
43
43
|
* TODO: Maybe Create some common util for gptChat and gptComplete
|
|
44
44
|
* TODO: Maybe make custom OpenaiError
|
|
45
45
|
*/
|
package/esm/typings/execution/plugins/llm-execution-tools/remote/RemoteLlmExecutionTools.d.ts
CHANGED
|
@@ -35,6 +35,6 @@ export declare class RemoteLlmExecutionTools implements LlmExecutionTools {
|
|
|
35
35
|
listModels(): Promise<Array<AvailableModel>>;
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
|
-
* TODO: [🍓]
|
|
38
|
+
* TODO: [🍓] Allow to list compatible models with each variant
|
|
39
39
|
* TODO: [🤹♂️] RemoteLlmExecutionTools should extend Destroyable and implement IDestroyable
|
|
40
40
|
*/
|
|
@@ -10,6 +10,7 @@ import { RemoteServerOptions } from './interfaces/RemoteServerOptions';
|
|
|
10
10
|
*/
|
|
11
11
|
export declare function startRemoteServer(options: RemoteServerOptions): IDestroyable;
|
|
12
12
|
/**
|
|
13
|
+
* TODO: [⚖] Expose the library to be able to connect to same library via createPromptbookLibraryFromUrl
|
|
13
14
|
* TODO: Handle progress - support streaming
|
|
14
15
|
* TODO: [🤹♂️] Do not hang up immediately but wait until client closes OR timeout
|
|
15
16
|
* TODO: [🤹♂️] Timeout on chat to free up resources
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Promisable } from 'type-fest';
|
|
2
|
+
type ForEachAsyncOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* Maximum number of tasks running in parallel
|
|
5
|
+
*
|
|
6
|
+
* @default Infinity
|
|
7
|
+
*/
|
|
8
|
+
inParallelCount?: number;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Async version of Array.forEach
|
|
12
|
+
*
|
|
13
|
+
* @param array - Array to iterate over
|
|
14
|
+
* @param options - Options for the function
|
|
15
|
+
* @param callbackfunction - Function to call for each item
|
|
16
|
+
*/
|
|
17
|
+
export declare function forEachAsync<TItem>(array: Array<TItem>, options: ForEachAsyncOptions, callbackfunction: (value: TItem, index: number, array: Array<TItem>) => Promisable<void>): Promise<void>;
|
|
18
|
+
export {};
|
|
@@ -10,20 +10,44 @@ type CreatePromptbookLibraryFromDirectoryOptions = {
|
|
|
10
10
|
* @default true
|
|
11
11
|
*/
|
|
12
12
|
isRecursive?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* If true, the library creation outputs information about each file it reads
|
|
15
|
+
*
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
isVerbose?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* If true, directory will be scanned only when needed not during the construction
|
|
21
|
+
*
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
isLazyLoaded?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* If true, whole library creation crashes on error in any promptbook
|
|
27
|
+
* If true and isLazyLoaded is true, the error is thrown on first access to the promptbook
|
|
28
|
+
*
|
|
29
|
+
* @default true
|
|
30
|
+
*/
|
|
31
|
+
isCrashOnError?: boolean;
|
|
13
32
|
};
|
|
14
33
|
/**
|
|
15
34
|
* Constructs Promptbook from given directory
|
|
16
35
|
*
|
|
17
36
|
* Note: Works only in Node.js environment because it reads the file system
|
|
18
|
-
* Note: The function does NOT return promise it returns the library directly which dynamically loads promptbooks when needed
|
|
19
|
-
* SO during the construction syntax and logic sources IS NOT validated
|
|
20
37
|
*
|
|
21
38
|
* @param path - path to the directory with promptbooks
|
|
22
39
|
* @param options - Misc options for the library
|
|
23
40
|
* @returns PromptbookLibrary
|
|
24
41
|
*/
|
|
25
|
-
export declare function createPromptbookLibraryFromDirectory(path: string_folder_path, options?: CreatePromptbookLibraryFromDirectoryOptions): PromptbookLibrary
|
|
42
|
+
export declare function createPromptbookLibraryFromDirectory(path: string_folder_path, options?: CreatePromptbookLibraryFromDirectoryOptions): Promise<PromptbookLibrary>;
|
|
26
43
|
export {};
|
|
27
44
|
/***
|
|
28
|
-
* TODO: [
|
|
45
|
+
* TODO: [🧠] Maybe do not do hacks like [1] and just create package @promptbook/node
|
|
46
|
+
* [🍓][🚯] maybe make `@promptbook/library` package
|
|
47
|
+
* TODO: Fix the dynamic import issue in Webpack (! Not working !)
|
|
48
|
+
* > ./node_modules/@promptbook/core/esm/index.es.js
|
|
49
|
+
* > Critical dependency: the request of a dependency is an expression
|
|
50
|
+
*
|
|
51
|
+
* Note: [1] Using require(just('fs/promises')) to allow
|
|
52
|
+
* the `@promptbook/core` work for both Node.js and browser environments
|
|
29
53
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -14,11 +14,11 @@ import { PromptbookLibrary } from '../PromptbookLibrary';
|
|
|
14
14
|
* Note: The function does NOT return promise it returns the library directly which waits for the sources to be resolved
|
|
15
15
|
* when error occurs in given promise or factory function, it is thrown during `listPromptbooks` or `getPromptbookByUrl` call
|
|
16
16
|
*
|
|
17
|
+
* Note: Consider using `createPromptbookLibraryFromDirectory` or `createPromptbookLibraryFromUrl`
|
|
17
18
|
*
|
|
18
19
|
* @param promptbookSourcesPromiseOrFactory
|
|
19
20
|
* @returns PromptbookLibrary
|
|
20
|
-
*
|
|
21
|
-
* @deprecated Consider using `createPromptbookLibraryFromUrl` or `createPromptbookLibraryFromDirectory`
|
|
21
|
+
* @private Just internal tool for other constructor functions
|
|
22
22
|
*/
|
|
23
23
|
export declare function createPromptbookLibraryFromPromise(promptbookSourcesPromiseOrFactory: Promise<Array<PromptbookJson | PromptbookString>> | (() => Promise<Array<PromptbookJson | PromptbookString>>)): PromptbookLibrary;
|
|
24
24
|
/***
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,13 +1,30 @@
|
|
|
1
|
+
import { string_url } from '../../types/typeAliases';
|
|
1
2
|
import { PromptbookLibrary } from '../PromptbookLibrary';
|
|
3
|
+
/**
|
|
4
|
+
* Options for `createPromptbookLibraryFromDirectory` function
|
|
5
|
+
*/
|
|
6
|
+
type CreatePromptbookLibraryFromUrlyOptions = {
|
|
7
|
+
/**
|
|
8
|
+
* If true, the library creation outputs information about each file it reads
|
|
9
|
+
*
|
|
10
|
+
* @default false
|
|
11
|
+
*/
|
|
12
|
+
isVerbose?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* If true, directory will be scanned only when needed not during the construction
|
|
15
|
+
*
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
isLazyLoaded?: boolean;
|
|
19
|
+
};
|
|
2
20
|
/**
|
|
3
21
|
* Constructs Promptbook from remote Promptbase URL
|
|
4
|
-
|
|
5
|
-
* Note: The function does NOT return promise it returns the library directly which dynamically loads promptbooks when needed
|
|
6
|
-
* SO during the construction syntax and logic sources IS NOT validated
|
|
7
|
-
*
|
|
22
|
+
|
|
8
23
|
* @returns PromptbookLibrary
|
|
9
24
|
*/
|
|
10
|
-
export declare function createPromptbookLibraryFromUrl(): PromptbookLibrary
|
|
25
|
+
export declare function createPromptbookLibraryFromUrl(url: string_url | URL, options: CreatePromptbookLibraryFromUrlyOptions): Promise<PromptbookLibrary>;
|
|
26
|
+
export {};
|
|
11
27
|
/***
|
|
28
|
+
* TODO: [⚖] Compatible with remote server
|
|
12
29
|
* TODO: [🍓][🚯] !!! Add to README and samples + maybe make `@promptbook/library` package
|
|
13
30
|
*/
|
|
@@ -39,7 +39,7 @@ export type Prompt = {
|
|
|
39
39
|
/**
|
|
40
40
|
* Unique identifier of the promptbook with specific template name as hash
|
|
41
41
|
*
|
|
42
|
-
* @example https://promptbook.webgpt.com/cs/write-website-content.ptbk.md
|
|
42
|
+
* @example https://promptbook.webgpt.com/cs/write-website-content.ptbk.md#keywords
|
|
43
43
|
*/
|
|
44
44
|
readonly promptbookUrl: string_promptbook_url_with_hashtemplate;
|
|
45
45
|
/**
|
|
@@ -179,13 +179,13 @@ export type string_url = string;
|
|
|
179
179
|
/**
|
|
180
180
|
* Semantic helper
|
|
181
181
|
*
|
|
182
|
-
* For example `"https://promptbook.webgpt.com/cs/write-website-content.ptbk.md
|
|
182
|
+
* For example `"https://promptbook.webgpt.com/cs/write-website-content.ptbk.md"`
|
|
183
183
|
*/
|
|
184
184
|
export type string_promptbook_url = string;
|
|
185
185
|
/**
|
|
186
186
|
* Semantic helper
|
|
187
187
|
*
|
|
188
|
-
* For example `"https://promptbook.webgpt.com/cs/write-website-content.ptbk.md
|
|
188
|
+
* For example `"https://promptbook.webgpt.com/cs/write-website-content.ptbk.md#keywords"`
|
|
189
189
|
*/
|
|
190
190
|
export type string_promptbook_url_with_hashtemplate = string;
|
|
191
191
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/remote-server",
|
|
3
|
-
"version": "0.52.0
|
|
3
|
+
"version": "0.52.0",
|
|
4
4
|
"description": "Library to supercharge your use of large language models",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"colors": "1.4.0",
|
|
38
38
|
"socket.io": "4.7.2",
|
|
39
|
-
"spacetrim": "0.11.
|
|
39
|
+
"spacetrim": "0.11.27"
|
|
40
40
|
},
|
|
41
41
|
"funding": [
|
|
42
42
|
{
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
}
|
|
50
50
|
],
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@promptbook/core": "0.52.0
|
|
52
|
+
"@promptbook/core": "0.52.0"
|
|
53
53
|
},
|
|
54
54
|
"main": "./umd/index.umd.js",
|
|
55
55
|
"module": "./esm/index.es.js",
|
package/umd/index.umd.js
CHANGED
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
/**
|
|
96
96
|
* The version of the Promptbook library
|
|
97
97
|
*/
|
|
98
|
-
var PROMPTBOOK_VERSION = '0.52.0-
|
|
98
|
+
var PROMPTBOOK_VERSION = '0.52.0-33';
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
101
|
* Remote server is a proxy server that uses its execution tools internally and exposes the executor interface externally.
|
|
@@ -210,6 +210,7 @@
|
|
|
210
210
|
};
|
|
211
211
|
}
|
|
212
212
|
/**
|
|
213
|
+
* TODO: [⚖] Expose the library to be able to connect to same library via createPromptbookLibraryFromUrl
|
|
213
214
|
* TODO: Handle progress - support streaming
|
|
214
215
|
* TODO: [🤹♂️] Do not hang up immediately but wait until client closes OR timeout
|
|
215
216
|
* TODO: [🤹♂️] Timeout on chat to free up resources
|
package/umd/index.umd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.js","sources":["../../../node_modules/tslib/tslib.es6.js","../../../src/errors/PromptbookExecutionError.ts","../../../src/version.ts","../../../src/execution/plugins/llm-execution-tools/remote/startRemoteServer.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n",null,null,null],"names":["http","spaceTrim","Server","colors"],"mappings":";;;;;;;;;;;IAAA;IACA;AACA;IACA;IACA;AACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;AACA;IACA,IAAI,aAAa,GAAG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CAAC,CAAC,CAAC,CAAC;6BACtG;4BAED,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,YAAY,cAAA,EAAuC,CAAC,CAAC;;;;4BAE/E,IAAI,EAAE,OAAK,YAAY,KAAK,CAAC,EAAE;gCAC3B,MAAM,OAAK,CAAC;6BACf;4BAED,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,YAAY,EAAE,OAAK,CAAC,OAAO,EAAoC,CAAC,CAAC;;;4BAExF,MAAM,CAAC,UAAU,EAAE,CAAC;;;;;iBAE3B,CAAC,CAAC;YAEH,MAAM,CAAC,EAAE,CAAC,YAAY,EAAE;;gBAEpB,IAAI,SAAS,EAAE;oBACX,OAAO,CAAC,IAAI,CAACA,0BAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;iBAC/D;aACJ,CAAC,CAAC;SACN,CAAC,CAAC;QAEH,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;;QAGxB,OAAO,CAAC,IAAI,CAACA,0BAAM,CAAC,OAAO,CAAC,8CAAuC,IAAI,CAAE,CAAC,CAAC,CAAC;QAC5E,IAAI,SAAS,EAAE;YACX,OAAO,CAAC,IAAI,CAACA,0BAAM,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC,CAAC;SACzD;QAED,IAAI,WAAW,GAAG,KAAK,CAAC;QAExB,OAAO;YACH,IAAI,WAAW;gBACX,OAAO,WAAW,CAAC;aACtB;YACD,OAAO;gBACH,IAAI,WAAW,EAAE;oBACb,OAAO;iBACV;gBACD,WAAW,GAAG,IAAI,CAAC;gBACnB,UAAU,CAAC,KAAK,EAAE,CAAC;gBACnB,MAAM,CAAC,KAAK,EAAE,CAAC;aAClB;SACJ,CAAC;IACN,CAAC;IAED;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.umd.js","sources":["../../../node_modules/tslib/tslib.es6.js","../../../src/errors/PromptbookExecutionError.ts","../../../src/version.ts","../../../src/execution/plugins/llm-execution-tools/remote/startRemoteServer.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n",null,null,null],"names":["http","spaceTrim","Server","colors"],"mappings":";;;;;;;;;;;IAAA;IACA;AACA;IACA;IACA;AACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;AACA;IACA,IAAI,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;IACnC,IAAI,aAAa,GAAG,MAAM,CAAC,cAAc;IACzC,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;IACpF,QAAQ,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,MAA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AC,UAAU,EAAE,CAAC;;;;;iBAE3B,CAAC,CAAC;YAEH,MAAM,CAAC,EAAE,CAAC,YAAY,EAAE;;gBAEpB,IAAI,SAAS,EAAE;oBACX,OAAO,CAAC,IAAI,CAACA,0BAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;iBAC/D;aACJ,CAAC,CAAC;SACN,CAAC,CAAC;QAEH,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;;QAGxB,OAAO,CAAC,IAAI,CAACA,0BAAM,CAAC,OAAO,CAAC,8CAAuC,IAAI,CAAE,CAAC,CAAC,CAAC;QAC5E,IAAI,SAAS,EAAE;YACX,OAAO,CAAC,IAAI,CAACA,0BAAM,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC,CAAC;SACzD;QAED,IAAI,WAAW,GAAG,KAAK,CAAC;QAExB,OAAO;YACH,IAAI,WAAW;gBACX,OAAO,WAAW,CAAC;aACtB;YACD,OAAO;gBACH,IAAI,WAAW,EAAE;oBACb,OAAO;iBACV;gBACD,WAAW,GAAG,IAAI,CAAC;gBACnB,UAAU,CAAC,KAAK,EAAE,CAAC;gBACnB,MAAM,CAAC,KAAK,EAAE,CAAC;aAClB;SACJ,CAAC;IACN,CAAC;IAED;;;;;;;;;;;;;;;;"}
|
|
@@ -10,17 +10,19 @@ import { CallbackInterfaceToolsOptions } from '../execution/plugins/user-interfa
|
|
|
10
10
|
import { SimplePromptInterfaceTools } from '../execution/plugins/user-interface-execution-tools/simple-prompt/SimplePromptInterfaceTools';
|
|
11
11
|
import { checkExpectations, isPassingExpectations } from '../execution/utils/checkExpectations';
|
|
12
12
|
import { createPromptbookLibraryFromDirectory } from '../library/constructors/createPromptbookLibraryFromDirectory';
|
|
13
|
-
import { createPromptbookLibraryFromPromise } from '../library/constructors/createPromptbookLibraryFromPromise';
|
|
14
13
|
import { createPromptbookLibraryFromSources } from '../library/constructors/createPromptbookLibraryFromSources';
|
|
14
|
+
import { createPromptbookLibraryFromUrl } from '../library/constructors/createPromptbookLibraryFromUrl';
|
|
15
15
|
import { createPromptbookSublibrary } from '../library/constructors/createPromptbookSublibrary';
|
|
16
|
+
import { justTestFsImport } from '../library/constructors/justTestFsImport';
|
|
16
17
|
import { SimplePromptbookLibrary } from '../library/SimplePromptbookLibrary';
|
|
17
18
|
import { executionReportJsonToString } from '../types/execution-report/executionReportJsonToString';
|
|
18
19
|
import { ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults } from '../types/execution-report/ExecutionReportStringOptions';
|
|
19
20
|
import { ExecutionTypes } from '../types/ExecutionTypes';
|
|
20
21
|
import { PROMPTBOOK_VERSION } from '../version';
|
|
22
|
+
export { justTestFsImport };
|
|
21
23
|
export { ExecutionTypes, PROMPTBOOK_VERSION };
|
|
22
24
|
export { assertsExecutionSuccessful, checkExpectations, executionReportJsonToString, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, isPassingExpectations, prettifyPromptbookString, };
|
|
23
|
-
export { createPromptbookLibraryFromDirectory,
|
|
25
|
+
export { createPromptbookLibraryFromDirectory, createPromptbookLibraryFromSources, createPromptbookLibraryFromUrl, createPromptbookSublibrary, SimplePromptbookLibrary, };
|
|
24
26
|
export { SimplePromptInterfaceTools };
|
|
25
27
|
export { promptbookJsonToString, promptbookStringToJson, validatePromptbookJson };
|
|
26
28
|
export { createPromptbookExecutor, MultipleLlmExecutionTools };
|
|
@@ -5,6 +5,7 @@ import { extractVariables } from '../conversion/utils/extractVariables';
|
|
|
5
5
|
import { parseNumber } from '../conversion/utils/parseNumber';
|
|
6
6
|
import { renameParameter } from '../conversion/utils/renameParameter';
|
|
7
7
|
import { titleToName } from '../conversion/utils/titleToName';
|
|
8
|
+
import { forEachAsync } from '../execution/utils/forEachAsync';
|
|
8
9
|
import { replaceParameters } from '../execution/utils/replaceParameters';
|
|
9
10
|
import { CountUtils } from '../utils/expectation-counters';
|
|
10
11
|
import { countCharacters } from '../utils/expectation-counters/countCharacters';
|
|
@@ -46,6 +47,7 @@ import { union } from '../utils/sets/union';
|
|
|
46
47
|
import { trimCodeBlock } from '../utils/trimCodeBlock';
|
|
47
48
|
import { trimEndOfCodeBlock } from '../utils/trimEndOfCodeBlock';
|
|
48
49
|
import { unwrapResult } from '../utils/unwrapResult';
|
|
50
|
+
export { forEachAsync };
|
|
49
51
|
export { extractAllBlocksFromMarkdown, // <- [🌻]
|
|
50
52
|
extractAllListItemsFromMarkdown, extractBlock, // <- [🌻]
|
|
51
53
|
extractOneBlockFromMarkdown, extractParameters, extractVariables, isValidJsonString, parseNumber, // <- [🌻]
|
|
@@ -9,6 +9,9 @@ import type { UserInterfaceTools } from './UserInterfaceTools';
|
|
|
9
9
|
export type ExecutionTools = {
|
|
10
10
|
/**
|
|
11
11
|
* Tools for executing prompts to large language models like GPT-4
|
|
12
|
+
*
|
|
13
|
+
* Tip: Combine multiple LLM execution tools with `MultipleLlmExecutionTools`
|
|
14
|
+
* @see https://github.com/webgptorg/promptbook/?tab=readme-ov-file#llm-execution-tools
|
|
12
15
|
*/
|
|
13
16
|
llm: LlmExecutionTools;
|
|
14
17
|
/**
|
|
@@ -16,15 +19,14 @@ export type ExecutionTools = {
|
|
|
16
19
|
*
|
|
17
20
|
* Note: You can pass multiple ScriptExecutionTools, they will be tried one by one until one of them supports the script
|
|
18
21
|
* If none of them supports the script, an error is thrown
|
|
22
|
+
* @see https://github.com/webgptorg/promptbook/?tab=readme-ov-file#script-execution-tools
|
|
19
23
|
*/
|
|
20
24
|
script: Array<ScriptExecutionTools>;
|
|
21
25
|
/**
|
|
22
26
|
* Tools for interacting with the user
|
|
23
27
|
*
|
|
24
28
|
* Note: When undefined, the user interface is disabled and promptbook which requires user interaction will fail
|
|
29
|
+
* @see https://github.com/webgptorg/promptbook/?tab=readme-ov-file#user-interface-tools
|
|
25
30
|
*/
|
|
26
31
|
userInterface?: UserInterfaceTools;
|
|
27
32
|
};
|
|
28
|
-
/**
|
|
29
|
-
* TODO: [🍓] !!!! Allow to have more LlmExecutionTools
|
|
30
|
-
*/
|
|
@@ -36,7 +36,6 @@ export declare class AnthropicClaudeExecutionTools implements LlmExecutionTools
|
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
38
|
* TODO: [🧠] Maybe handle errors via transformAnthropicError (like transformAzureError)
|
|
39
|
-
* TODO: [🍓][♐] Allow to list compatible models with each variant
|
|
40
39
|
* TODO: Maybe Create some common util for gptChat and gptComplete
|
|
41
40
|
* TODO: Maybe make custom OpenaiError
|
|
42
41
|
*/
|
|
@@ -35,7 +35,6 @@ export declare class AzureOpenAiExecutionTools implements LlmExecutionTools {
|
|
|
35
35
|
listModels(): Promise<Array<AvailableModel>>;
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
|
-
* TODO: [🍓][♐] Allow to list compatible models with each variant
|
|
39
38
|
* TODO: Maybe Create some common util for gptChat and gptComplete
|
|
40
39
|
* TODO: Maybe make custom AzureOpenaiError
|
|
41
40
|
*/
|
|
@@ -39,7 +39,7 @@ export declare class OpenAiExecutionTools implements LlmExecutionTools {
|
|
|
39
39
|
listModels(): Array<AvailableModel>;
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
|
-
* TODO: [
|
|
42
|
+
* TODO: [🧠][🧙♂️] Maybe there can be some wizzard for thoose who want to use just OpenAI
|
|
43
43
|
* TODO: Maybe Create some common util for gptChat and gptComplete
|
|
44
44
|
* TODO: Maybe make custom OpenaiError
|
|
45
45
|
*/
|
package/umd/typings/execution/plugins/llm-execution-tools/remote/RemoteLlmExecutionTools.d.ts
CHANGED
|
@@ -35,6 +35,6 @@ export declare class RemoteLlmExecutionTools implements LlmExecutionTools {
|
|
|
35
35
|
listModels(): Promise<Array<AvailableModel>>;
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
|
-
* TODO: [🍓]
|
|
38
|
+
* TODO: [🍓] Allow to list compatible models with each variant
|
|
39
39
|
* TODO: [🤹♂️] RemoteLlmExecutionTools should extend Destroyable and implement IDestroyable
|
|
40
40
|
*/
|
|
@@ -10,6 +10,7 @@ import { RemoteServerOptions } from './interfaces/RemoteServerOptions';
|
|
|
10
10
|
*/
|
|
11
11
|
export declare function startRemoteServer(options: RemoteServerOptions): IDestroyable;
|
|
12
12
|
/**
|
|
13
|
+
* TODO: [⚖] Expose the library to be able to connect to same library via createPromptbookLibraryFromUrl
|
|
13
14
|
* TODO: Handle progress - support streaming
|
|
14
15
|
* TODO: [🤹♂️] Do not hang up immediately but wait until client closes OR timeout
|
|
15
16
|
* TODO: [🤹♂️] Timeout on chat to free up resources
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Promisable } from 'type-fest';
|
|
2
|
+
type ForEachAsyncOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* Maximum number of tasks running in parallel
|
|
5
|
+
*
|
|
6
|
+
* @default Infinity
|
|
7
|
+
*/
|
|
8
|
+
inParallelCount?: number;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Async version of Array.forEach
|
|
12
|
+
*
|
|
13
|
+
* @param array - Array to iterate over
|
|
14
|
+
* @param options - Options for the function
|
|
15
|
+
* @param callbackfunction - Function to call for each item
|
|
16
|
+
*/
|
|
17
|
+
export declare function forEachAsync<TItem>(array: Array<TItem>, options: ForEachAsyncOptions, callbackfunction: (value: TItem, index: number, array: Array<TItem>) => Promisable<void>): Promise<void>;
|
|
18
|
+
export {};
|
|
@@ -10,20 +10,44 @@ type CreatePromptbookLibraryFromDirectoryOptions = {
|
|
|
10
10
|
* @default true
|
|
11
11
|
*/
|
|
12
12
|
isRecursive?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* If true, the library creation outputs information about each file it reads
|
|
15
|
+
*
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
isVerbose?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* If true, directory will be scanned only when needed not during the construction
|
|
21
|
+
*
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
isLazyLoaded?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* If true, whole library creation crashes on error in any promptbook
|
|
27
|
+
* If true and isLazyLoaded is true, the error is thrown on first access to the promptbook
|
|
28
|
+
*
|
|
29
|
+
* @default true
|
|
30
|
+
*/
|
|
31
|
+
isCrashOnError?: boolean;
|
|
13
32
|
};
|
|
14
33
|
/**
|
|
15
34
|
* Constructs Promptbook from given directory
|
|
16
35
|
*
|
|
17
36
|
* Note: Works only in Node.js environment because it reads the file system
|
|
18
|
-
* Note: The function does NOT return promise it returns the library directly which dynamically loads promptbooks when needed
|
|
19
|
-
* SO during the construction syntax and logic sources IS NOT validated
|
|
20
37
|
*
|
|
21
38
|
* @param path - path to the directory with promptbooks
|
|
22
39
|
* @param options - Misc options for the library
|
|
23
40
|
* @returns PromptbookLibrary
|
|
24
41
|
*/
|
|
25
|
-
export declare function createPromptbookLibraryFromDirectory(path: string_folder_path, options?: CreatePromptbookLibraryFromDirectoryOptions): PromptbookLibrary
|
|
42
|
+
export declare function createPromptbookLibraryFromDirectory(path: string_folder_path, options?: CreatePromptbookLibraryFromDirectoryOptions): Promise<PromptbookLibrary>;
|
|
26
43
|
export {};
|
|
27
44
|
/***
|
|
28
|
-
* TODO: [
|
|
45
|
+
* TODO: [🧠] Maybe do not do hacks like [1] and just create package @promptbook/node
|
|
46
|
+
* [🍓][🚯] maybe make `@promptbook/library` package
|
|
47
|
+
* TODO: Fix the dynamic import issue in Webpack (! Not working !)
|
|
48
|
+
* > ./node_modules/@promptbook/core/esm/index.es.js
|
|
49
|
+
* > Critical dependency: the request of a dependency is an expression
|
|
50
|
+
*
|
|
51
|
+
* Note: [1] Using require(just('fs/promises')) to allow
|
|
52
|
+
* the `@promptbook/core` work for both Node.js and browser environments
|
|
29
53
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -14,11 +14,11 @@ import { PromptbookLibrary } from '../PromptbookLibrary';
|
|
|
14
14
|
* Note: The function does NOT return promise it returns the library directly which waits for the sources to be resolved
|
|
15
15
|
* when error occurs in given promise or factory function, it is thrown during `listPromptbooks` or `getPromptbookByUrl` call
|
|
16
16
|
*
|
|
17
|
+
* Note: Consider using `createPromptbookLibraryFromDirectory` or `createPromptbookLibraryFromUrl`
|
|
17
18
|
*
|
|
18
19
|
* @param promptbookSourcesPromiseOrFactory
|
|
19
20
|
* @returns PromptbookLibrary
|
|
20
|
-
*
|
|
21
|
-
* @deprecated Consider using `createPromptbookLibraryFromUrl` or `createPromptbookLibraryFromDirectory`
|
|
21
|
+
* @private Just internal tool for other constructor functions
|
|
22
22
|
*/
|
|
23
23
|
export declare function createPromptbookLibraryFromPromise(promptbookSourcesPromiseOrFactory: Promise<Array<PromptbookJson | PromptbookString>> | (() => Promise<Array<PromptbookJson | PromptbookString>>)): PromptbookLibrary;
|
|
24
24
|
/***
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,13 +1,30 @@
|
|
|
1
|
+
import { string_url } from '../../types/typeAliases';
|
|
1
2
|
import { PromptbookLibrary } from '../PromptbookLibrary';
|
|
3
|
+
/**
|
|
4
|
+
* Options for `createPromptbookLibraryFromDirectory` function
|
|
5
|
+
*/
|
|
6
|
+
type CreatePromptbookLibraryFromUrlyOptions = {
|
|
7
|
+
/**
|
|
8
|
+
* If true, the library creation outputs information about each file it reads
|
|
9
|
+
*
|
|
10
|
+
* @default false
|
|
11
|
+
*/
|
|
12
|
+
isVerbose?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* If true, directory will be scanned only when needed not during the construction
|
|
15
|
+
*
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
isLazyLoaded?: boolean;
|
|
19
|
+
};
|
|
2
20
|
/**
|
|
3
21
|
* Constructs Promptbook from remote Promptbase URL
|
|
4
|
-
|
|
5
|
-
* Note: The function does NOT return promise it returns the library directly which dynamically loads promptbooks when needed
|
|
6
|
-
* SO during the construction syntax and logic sources IS NOT validated
|
|
7
|
-
*
|
|
22
|
+
|
|
8
23
|
* @returns PromptbookLibrary
|
|
9
24
|
*/
|
|
10
|
-
export declare function createPromptbookLibraryFromUrl(): PromptbookLibrary
|
|
25
|
+
export declare function createPromptbookLibraryFromUrl(url: string_url | URL, options: CreatePromptbookLibraryFromUrlyOptions): Promise<PromptbookLibrary>;
|
|
26
|
+
export {};
|
|
11
27
|
/***
|
|
28
|
+
* TODO: [⚖] Compatible with remote server
|
|
12
29
|
* TODO: [🍓][🚯] !!! Add to README and samples + maybe make `@promptbook/library` package
|
|
13
30
|
*/
|
|
@@ -39,7 +39,7 @@ export type Prompt = {
|
|
|
39
39
|
/**
|
|
40
40
|
* Unique identifier of the promptbook with specific template name as hash
|
|
41
41
|
*
|
|
42
|
-
* @example https://promptbook.webgpt.com/cs/write-website-content.ptbk.md
|
|
42
|
+
* @example https://promptbook.webgpt.com/cs/write-website-content.ptbk.md#keywords
|
|
43
43
|
*/
|
|
44
44
|
readonly promptbookUrl: string_promptbook_url_with_hashtemplate;
|
|
45
45
|
/**
|
|
@@ -179,13 +179,13 @@ export type string_url = string;
|
|
|
179
179
|
/**
|
|
180
180
|
* Semantic helper
|
|
181
181
|
*
|
|
182
|
-
* For example `"https://promptbook.webgpt.com/cs/write-website-content.ptbk.md
|
|
182
|
+
* For example `"https://promptbook.webgpt.com/cs/write-website-content.ptbk.md"`
|
|
183
183
|
*/
|
|
184
184
|
export type string_promptbook_url = string;
|
|
185
185
|
/**
|
|
186
186
|
* Semantic helper
|
|
187
187
|
*
|
|
188
|
-
* For example `"https://promptbook.webgpt.com/cs/write-website-content.ptbk.md
|
|
188
|
+
* For example `"https://promptbook.webgpt.com/cs/write-website-content.ptbk.md#keywords"`
|
|
189
189
|
*/
|
|
190
190
|
export type string_promptbook_url_with_hashtemplate = string;
|
|
191
191
|
/**
|