@promptbook/ollama 0.112.0-65 → 0.112.0-66
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/esm/index.es.js +50 -2
- package/esm/index.es.js.map +1 -1
- package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +1 -1
- package/esm/src/avatars/visuals/minecraft2AvatarVisual.d.ts +7 -0
- package/esm/src/avatars/visuals/minecraftAvatarVisualShared.d.ts +48 -0
- package/esm/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +1 -1
- package/esm/src/config.d.ts +3 -3
- package/esm/src/utils/files/getPromptbookTempPath.d.ts +24 -0
- package/esm/src/utils/files/getPromptbookTempPath.test.d.ts +1 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +53 -5
- package/umd/index.umd.js.map +1 -1
- package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +1 -1
- package/umd/src/avatars/visuals/minecraft2AvatarVisual.d.ts +7 -0
- package/umd/src/avatars/visuals/minecraftAvatarVisualShared.d.ts +48 -0
- package/umd/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +1 -1
- package/umd/src/config.d.ts +3 -3
- package/umd/src/utils/files/getPromptbookTempPath.d.ts +24 -0
- package/umd/src/utils/files/getPromptbookTempPath.test.d.ts +1 -0
- package/umd/src/version.d.ts +1 -1
package/esm/index.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { spaceTrim as spaceTrim$1 } from 'spacetrim';
|
|
2
|
+
import { posix } from 'path';
|
|
2
3
|
import { randomBytes } from 'crypto';
|
|
3
4
|
import Bottleneck from 'bottleneck';
|
|
4
5
|
import colors from 'colors';
|
|
5
6
|
import OpenAI from 'openai';
|
|
6
|
-
import 'path';
|
|
7
7
|
import 'crypto-js';
|
|
8
8
|
import 'crypto-js/enc-hex';
|
|
9
9
|
|
|
@@ -21,7 +21,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
21
21
|
* @generated
|
|
22
22
|
* @see https://github.com/webgptorg/promptbook
|
|
23
23
|
*/
|
|
24
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
24
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-66';
|
|
25
25
|
/**
|
|
26
26
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
27
27
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -1087,6 +1087,29 @@ function saturate(amount) {
|
|
|
1087
1087
|
}
|
|
1088
1088
|
// TODO: Maybe implement by mix+hsl
|
|
1089
1089
|
|
|
1090
|
+
/**
|
|
1091
|
+
* Relative directory name without the `./` prefix for Git ignore rules and glob patterns.
|
|
1092
|
+
*
|
|
1093
|
+
* @private internal utility for Promptbook-owned temp files
|
|
1094
|
+
*/
|
|
1095
|
+
const PROMPTBOOK_TEMP_DIRECTORY_NAME = '.promptbook';
|
|
1096
|
+
/**
|
|
1097
|
+
* Builds one project-relative path inside the shared Promptbook working directory.
|
|
1098
|
+
*
|
|
1099
|
+
* @private internal utility for Promptbook-owned temp files
|
|
1100
|
+
*/
|
|
1101
|
+
function getPromptbookTempPath(...pathSegments) {
|
|
1102
|
+
return `./${getPromptbookTempPosixPath(...pathSegments)}`;
|
|
1103
|
+
}
|
|
1104
|
+
/**
|
|
1105
|
+
* Builds one POSIX path fragment inside the shared Promptbook working directory for globs and generated text files.
|
|
1106
|
+
*
|
|
1107
|
+
* @private internal utility for Promptbook-owned temp files
|
|
1108
|
+
*/
|
|
1109
|
+
function getPromptbookTempPosixPath(...pathSegments) {
|
|
1110
|
+
return posix.join(PROMPTBOOK_TEMP_DIRECTORY_NAME, ...pathSegments);
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1090
1113
|
/**
|
|
1091
1114
|
* Name for the Promptbook
|
|
1092
1115
|
*
|
|
@@ -1188,6 +1211,31 @@ const SMALL_NUMBER = 0.001;
|
|
|
1188
1211
|
* @private within the repository - too low-level in comparison with other `MAX_...`
|
|
1189
1212
|
*/
|
|
1190
1213
|
const CONNECTION_RETRIES_LIMIT = 5;
|
|
1214
|
+
// <- TODO: [🕝] Make also `AGENTS_DIRNAME_ALTERNATIVES`
|
|
1215
|
+
/**
|
|
1216
|
+
* Where to store the temporary downloads
|
|
1217
|
+
*
|
|
1218
|
+
* Note: When the folder does not exist, it is created recursively
|
|
1219
|
+
*
|
|
1220
|
+
* @public exported from `@promptbook/core`
|
|
1221
|
+
*/
|
|
1222
|
+
getPromptbookTempPath('download-cache');
|
|
1223
|
+
/**
|
|
1224
|
+
* Where to store the cache of executions for promptbook CLI
|
|
1225
|
+
*
|
|
1226
|
+
* Note: When the folder does not exist, it is created recursively
|
|
1227
|
+
*
|
|
1228
|
+
* @public exported from `@promptbook/core`
|
|
1229
|
+
*/
|
|
1230
|
+
getPromptbookTempPath('execution-cache');
|
|
1231
|
+
/**
|
|
1232
|
+
* Where to store the scrape cache
|
|
1233
|
+
*
|
|
1234
|
+
* Note: When the folder does not exist, it is created recursively
|
|
1235
|
+
*
|
|
1236
|
+
* @public exported from `@promptbook/core`
|
|
1237
|
+
*/
|
|
1238
|
+
getPromptbookTempPath('scrape-cache');
|
|
1191
1239
|
// <- TODO: [🧜♂️]
|
|
1192
1240
|
/**
|
|
1193
1241
|
* Default settings for parsing and generating CSV files in Promptbook.
|