@promptbook/types 0.89.0 → 0.92.0-3

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 CHANGED
@@ -23,6 +23,10 @@
23
23
 
24
24
 
25
25
 
26
+ <blockquote style="color: #ff8811">
27
+ <b>⚠ Warning:</b> This is a pre-release version of the library. It is not yet ready for production use. Please look at <a href="https://www.npmjs.com/package/@promptbook/core?activeTab=versions">latest stable release</a>.
28
+ </blockquote>
29
+
26
30
  ## 📦 Package `@promptbook/types`
27
31
 
28
32
  - Promptbooks are [divided into several](#-packages) packages, all are published from [single monorepo](https://github.com/webgptorg/promptbook).
@@ -87,6 +87,7 @@ import { FORMFACTOR_DEFINITIONS } from '../formfactors/index';
87
87
  import { MatcherFormfactorDefinition } from '../formfactors/matcher/MatcherFormfactorDefinition';
88
88
  import { SheetsFormfactorDefinition } from '../formfactors/sheets/SheetsFormfactorDefinition';
89
89
  import { TranslatorFormfactorDefinition } from '../formfactors/translator/TranslatorFormfactorDefinition';
90
+ import { filterModels } from '../llm-providers/_common/filterModels';
90
91
  import { $llmToolsMetadataRegister } from '../llm-providers/_common/register/$llmToolsMetadataRegister';
91
92
  import { $llmToolsRegister } from '../llm-providers/_common/register/$llmToolsRegister';
92
93
  import { createLlmToolsFromConfiguration } from '../llm-providers/_common/register/createLlmToolsFromConfiguration';
@@ -225,6 +226,7 @@ export { FORMFACTOR_DEFINITIONS };
225
226
  export { MatcherFormfactorDefinition };
226
227
  export { SheetsFormfactorDefinition };
227
228
  export { TranslatorFormfactorDefinition };
229
+ export { filterModels };
228
230
  export { $llmToolsMetadataRegister };
229
231
  export { $llmToolsRegister };
230
232
  export { createLlmToolsFromConfiguration };
@@ -0,0 +1,15 @@
1
+ import type { AvailableModel } from '../../execution/AvailableModel';
2
+ import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
3
+ /**
4
+ * Creates a wrapper around LlmExecutionTools that only exposes models matching the filter function
5
+ *
6
+ * @param llmTools The original LLM execution tools to wrap
7
+ * @param modelFilter Function that determines whether a model should be included
8
+ * @returns A new LlmExecutionTools instance with filtered models
9
+ *
10
+ * @public exported from `@promptbook/core`
11
+ */
12
+ export declare function filterModels<TLlmTools extends LlmExecutionTools>(llmTools: TLlmTools, modelFilter: (model: AvailableModel) => boolean): TLlmTools;
13
+ /**
14
+ * TODO: !!! [models] Test that this is working
15
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/types",
3
- "version": "0.89.0",
3
+ "version": "0.92.0-3",
4
4
  "description": "It's time for a paradigm shift. The future of software in plain English, French or Latin",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -49,6 +49,6 @@
49
49
  },
50
50
  "typings": "./esm/typings/src/_packages/types.index.d.ts",
51
51
  "peerDependencies": {
52
- "@promptbook/core": "0.89.0"
52
+ "@promptbook/core": "0.92.0-3"
53
53
  }
54
54
  }