@promptbook/cli 0.98.0-8 → 0.98.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 CHANGED
@@ -25,10 +25,6 @@ Write AI applications using plain human language across multiple models and plat
25
25
 
26
26
 
27
27
 
28
- <blockquote style="color: #ff8811">
29
- <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>.
30
- </blockquote>
31
-
32
28
  ## 📦 Package `@promptbook/cli`
33
29
 
34
30
  - Promptbooks are [divided into several](#-packages) packages, all are published from [single monorepo](https://github.com/webgptorg/promptbook).
package/esm/index.es.js CHANGED
@@ -47,7 +47,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
47
47
  * @generated
48
48
  * @see https://github.com/webgptorg/promptbook
49
49
  */
50
- const PROMPTBOOK_ENGINE_VERSION = '0.98.0-8';
50
+ const PROMPTBOOK_ENGINE_VERSION = '0.98.0';
51
51
  /**
52
52
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
53
53
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -3729,8 +3729,10 @@ function createLlmToolsFromConfiguration(configuration, options = {}) {
3729
3729
  .list()
3730
3730
  .find(({ packageName, className }) => llmConfiguration.packageName === packageName && llmConfiguration.className === className);
3731
3731
  if (registeredItem === undefined) {
3732
+ // console.log('$llmToolsRegister.list()', $llmToolsRegister.list());
3732
3733
  throw new Error(spaceTrim((block) => `
3733
3734
  There is no constructor for LLM provider \`${llmConfiguration.className}\` from \`${llmConfiguration.packageName}\`
3735
+ Running in ${!$isRunningInBrowser() ? '' : 'browser environment'}${!$isRunningInNode() ? '' : 'node environment'}${!$isRunningInWebWorker() ? '' : 'worker environment'}
3734
3736
 
3735
3737
  You have probably forgotten install and import the provider package.
3736
3738
  To fix this issue, you can:
@@ -14870,7 +14872,6 @@ function startRemoteServer(options) {
14870
14872
  catch (error) {
14871
14873
  assertsError(error);
14872
14874
  socket.emit('error', serializeError(error));
14873
- // <- TODO: [🚋] There is a problem with the remote server handling errors and sending them back to the client
14874
14875
  }
14875
14876
  finally {
14876
14877
  socket.disconnect();
@@ -18163,6 +18164,7 @@ const _OpenAiCompatibleMetadataRegistration = $llmToolsMetadataRegister.register
18163
18164
  options: {
18164
18165
  apiKey: 'sk-',
18165
18166
  baseURL: 'https://api.openai.com/v1',
18167
+ defaultModelName: 'gpt-4-turbo',
18166
18168
  isProxied: false,
18167
18169
  remoteServerUrl: DEFAULT_REMOTE_SERVER_URL,
18168
18170
  maxRequestsPerMinute: DEFAULT_MAX_REQUESTS_PER_MINUTE,
@@ -18170,27 +18172,6 @@ const _OpenAiCompatibleMetadataRegistration = $llmToolsMetadataRegister.register
18170
18172
  };
18171
18173
  },
18172
18174
  createConfigurationFromEnv(env) {
18173
- // Note: OpenAiCompatibleExecutionTools is an abstract class and cannot be instantiated directly
18174
- // However, we can provide configuration for users who want to manually instantiate it
18175
- if (typeof env.OPENAI_API_KEY === 'string') {
18176
- const options = {
18177
- apiKey: env.OPENAI_API_KEY,
18178
- isProxied: false,
18179
- remoteServerUrl: DEFAULT_REMOTE_SERVER_URL,
18180
- maxRequestsPerMinute: DEFAULT_MAX_REQUESTS_PER_MINUTE,
18181
- defaultModelName: 'gpt-4-turbo',
18182
- };
18183
- // Add baseURL if provided in environment
18184
- if (typeof env.OPENAI_BASE_URL === 'string') {
18185
- options.baseURL = env.OPENAI_BASE_URL;
18186
- }
18187
- return {
18188
- title: 'Open AI Compatible (from env)',
18189
- packageName: '@promptbook/openai',
18190
- className: 'OpenAiCompatibleExecutionTools',
18191
- options,
18192
- };
18193
- }
18194
18175
  return null;
18195
18176
  },
18196
18177
  });