@promptbook/openai 0.67.1 → 0.67.2

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
@@ -6,7 +6,7 @@ import spaceTrim$1, { spaceTrim } from 'spacetrim';
6
6
  /**
7
7
  * The version of the Promptbook library
8
8
  */
9
- var PROMPTBOOK_VERSION = '0.67.0';
9
+ var PROMPTBOOK_VERSION = '0.67.1';
10
10
  // TODO: !!!! List here all the versions and annotate + put into script
11
11
 
12
12
  /*! *****************************************************************************
@@ -14,7 +14,6 @@ declare const _default: ({
14
14
  title: string;
15
15
  modelRequirements: {
16
16
  modelVariant: string;
17
- modelName: string;
18
17
  };
19
18
  content: string;
20
19
  dependentParameterNames: string[];
@@ -41,7 +40,6 @@ declare const _default: ({
41
40
  title: string;
42
41
  modelRequirements: {
43
42
  modelVariant: string;
44
- modelName: string;
45
43
  };
46
44
  content: string;
47
45
  expectations: {
@@ -27,6 +27,7 @@ import { stringifyPipelineJson } from '../conversion/utils/stringifyPipelineJson
27
27
  import { validatePipeline } from '../conversion/validation/validatePipeline';
28
28
  import { CollectionError } from '../errors/CollectionError';
29
29
  import { EnvironmentMismatchError } from '../errors/EnvironmentMismatchError';
30
+ import { ExpectError } from '../errors/ExpectError';
30
31
  import { ERRORS } from '../errors/index';
31
32
  import { LimitReachedError } from '../errors/LimitReachedError';
32
33
  import { NotFoundError } from '../errors/NotFoundError';
@@ -99,6 +100,7 @@ export { stringifyPipelineJson };
99
100
  export { validatePipeline };
100
101
  export { CollectionError };
101
102
  export { EnvironmentMismatchError };
103
+ export { ExpectError };
102
104
  export { ERRORS };
103
105
  export { LimitReachedError };
104
106
  export { NotFoundError };
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * This error occurs when some expectation is not met in the execution of the pipeline
3
3
  *
4
- * @private error of `checkExpectations` and `createPipelineExecutor`
4
+ * @public exported from `@promptbook/core`
5
+ * Note: Do not throw this error, its reserved for `checkExpectations` and `createPipelineExecutor` and public ONLY to be serializable through remote server
5
6
  * Note: Always thrown in `checkExpectations` and catched in `createPipelineExecutor` and rethrown as `PipelineExecutionError`
6
7
  * Note: This is a kindof subtype of PipelineExecutionError
7
8
  */
@@ -1,5 +1,6 @@
1
1
  import { CollectionError } from './CollectionError';
2
2
  import { EnvironmentMismatchError } from './EnvironmentMismatchError';
3
+ import { ExpectError } from './ExpectError';
3
4
  import { LimitReachedError } from './LimitReachedError';
4
5
  import { NotFoundError } from './NotFoundError';
5
6
  import { NotYetImplementedError } from './NotYetImplementedError';
@@ -14,6 +15,7 @@ import { UnexpectedError } from './UnexpectedError';
14
15
  * @public exported from `@promptbook/core`
15
16
  */
16
17
  export declare const ERRORS: {
18
+ readonly ExpectError: typeof ExpectError;
17
19
  readonly CollectionError: typeof CollectionError;
18
20
  readonly EnvironmentMismatchError: typeof EnvironmentMismatchError;
19
21
  readonly LimitReachedError: typeof LimitReachedError;
@@ -14,4 +14,6 @@ export declare function preparePipeline(pipeline: PipelineJson, options: Prepare
14
14
  * TODO: [🏏] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
15
15
  * TODO: [🧊] In future one preparation can take data from previous preparation and save tokens and time
16
16
  * TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
17
+ * TODO: [🧠][♏] Maybe if expecting JSON (In Anthropic Claude and other models without non-json) and its not specified in prompt content, append the instructions
18
+ * @see https://docs.anthropic.com/en/docs/test-and-evaluate/strengthen-guardrails/increase-consistency#specify-the-desired-output-format
17
19
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/openai",
3
- "version": "0.67.1",
3
+ "version": "0.67.2",
4
4
  "description": "Supercharge your use of large language models",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -47,7 +47,7 @@
47
47
  "module": "./esm/index.es.js",
48
48
  "typings": "./esm/typings/src/_packages/openai.index.d.ts",
49
49
  "peerDependencies": {
50
- "@promptbook/core": "0.67.1"
50
+ "@promptbook/core": "0.67.2"
51
51
  },
52
52
  "dependencies": {
53
53
  "colors": "1.4.0",
package/umd/index.umd.js CHANGED
@@ -14,7 +14,7 @@
14
14
  /**
15
15
  * The version of the Promptbook library
16
16
  */
17
- var PROMPTBOOK_VERSION = '0.67.0';
17
+ var PROMPTBOOK_VERSION = '0.67.1';
18
18
  // TODO: !!!! List here all the versions and annotate + put into script
19
19
 
20
20
  /*! *****************************************************************************