@promptbook/core 0.92.0-31 → 0.92.0-32
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
CHANGED
|
@@ -27,7 +27,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
27
27
|
* @generated
|
|
28
28
|
* @see https://github.com/webgptorg/promptbook
|
|
29
29
|
*/
|
|
30
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.92.0-
|
|
30
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.92.0-32';
|
|
31
31
|
/**
|
|
32
32
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
33
33
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -3198,23 +3198,17 @@ class MultipleLlmExecutionTools {
|
|
|
3198
3198
|
* Check the configuration of all execution tools
|
|
3199
3199
|
*/
|
|
3200
3200
|
async checkConfiguration() {
|
|
3201
|
-
//
|
|
3202
|
-
|
|
3203
|
-
await llmExecutionTools.checkConfiguration();
|
|
3204
|
-
}
|
|
3201
|
+
// Note: Run checks in parallel
|
|
3202
|
+
await Promise.all(this.llmExecutionTools.map((tools) => tools.checkConfiguration()));
|
|
3205
3203
|
}
|
|
3206
3204
|
/**
|
|
3207
3205
|
* List all available models that can be used
|
|
3208
3206
|
* This lists is a combination of all available models from all execution tools
|
|
3209
3207
|
*/
|
|
3210
3208
|
async listModels() {
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
const models = await llmExecutionTools.listModels();
|
|
3215
|
-
availableModels.push(...models);
|
|
3216
|
-
}
|
|
3217
|
-
return availableModels;
|
|
3209
|
+
// Obtain all models in parallel and flatten
|
|
3210
|
+
const modelArrays = await Promise.all(this.llmExecutionTools.map((tools) => tools.listModels()));
|
|
3211
|
+
return modelArrays.flat();
|
|
3218
3212
|
}
|
|
3219
3213
|
/**
|
|
3220
3214
|
* Calls the best available chat model
|