@promptbook/cli 0.84.0-15 → 0.84.0-16

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
@@ -14,7 +14,7 @@
14
14
 
15
15
 
16
16
 
17
- ## New Features
17
+ ## 🌟 New Features
18
18
 
19
19
  - 🐋 **Support of [DeepSeek models](https://www.deepseek.com/)**
20
20
  - 💙 Working [the **Book** language v1.0.0](https://github.com/webgptorg/book)
@@ -320,8 +320,9 @@ Or you can install them separately:
320
320
  - **[@promptbook/anthropic-claude](https://www.npmjs.com/package/@promptbook/anthropic-claude)** - Execution tools for Anthropic Claude API, wrapper around Anthropic Claude SDK
321
321
  - **[@promptbook/vercel](https://www.npmjs.com/package/@promptbook/vercel)** - Adapter for Vercel functionalities
322
322
  - **[@promptbook/google](https://www.npmjs.com/package/@promptbook/google)** - Integration with Google's Gemini API
323
+ - **[@promptbook/deepseek](https://www.npmjs.com/package/@promptbook/deepseek)** - Integration with [DeepSeek API](https://www.deepseek.com/)
323
324
  - **[@promptbook/azure-openai](https://www.npmjs.com/package/@promptbook/azure-openai)** - Execution tools for Azure OpenAI API
324
- - **[@promptbook/langtail](https://www.npmjs.com/package/@promptbook/langtail)** - Execution tools for Langtail API, wrapper around Langtail SDK
325
+
325
326
  - **[@promptbook/fake-llm](https://www.npmjs.com/package/@promptbook/fake-llm)** - Mocked execution tools for testing the library and saving the tokens
326
327
  - **[@promptbook/remote-client](https://www.npmjs.com/package/@promptbook/remote-client)** - Remote client for remote execution of promptbooks
327
328
  - **[@promptbook/remote-server](https://www.npmjs.com/package/@promptbook/remote-server)** - Remote server for remote execution of promptbooks
package/esm/index.es.js CHANGED
@@ -38,7 +38,7 @@ var BOOK_LANGUAGE_VERSION = '1.0.0';
38
38
  * @generated
39
39
  * @see https://github.com/webgptorg/promptbook
40
40
  */
41
- var PROMPTBOOK_ENGINE_VERSION = '0.84.0-14';
41
+ var PROMPTBOOK_ENGINE_VERSION = '0.84.0-15';
42
42
  /**
43
43
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
44
44
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -15058,16 +15058,16 @@ var _AzureOpenAiRegistration = $llmToolsRegister.register(createAzureOpenAiExecu
15058
15058
  * @public exported from `@promptbook/wizzard`
15059
15059
  * @public exported from `@promptbook/cli`
15060
15060
  */
15061
- var _GoogleMetadataRegistration = $llmToolsMetadataRegister.register({
15062
- title: 'Google Gemini',
15063
- packageName: '@promptbook/google',
15064
- className: 'GoogleExecutionTools',
15065
- envVariables: ['GOOGLE_GENERATIVE_AI_API_KEY'],
15061
+ var _DeepseekMetadataRegistration = $llmToolsMetadataRegister.register({
15062
+ title: 'Deepseek',
15063
+ packageName: '@promptbook/deepseek',
15064
+ className: 'DeepseekExecutionTools',
15065
+ envVariables: ['DEEPSEEK_GENERATIVE_AI_API_KEY'],
15066
15066
  getBoilerplateConfiguration: function () {
15067
15067
  return {
15068
- title: 'Google Gemini (boilerplate)',
15069
- packageName: '@promptbook/google',
15070
- className: 'GoogleExecutionTools',
15068
+ title: 'Deepseek (boilerplate)',
15069
+ packageName: '@promptbook/deepseek',
15070
+ className: 'DeepseekExecutionTools',
15071
15071
  options: {
15072
15072
  apiKey: 'AI',
15073
15073
  },
@@ -15077,17 +15077,17 @@ var _GoogleMetadataRegistration = $llmToolsMetadataRegister.register({
15077
15077
  if ($isRunningInJest()
15078
15078
  // <- TODO: Maybe check `env.JEST_WORKER_ID` directly here or pass `env` into `$isRunningInJest`
15079
15079
  ) {
15080
- // Note: [🔘] Gemini makes problems in Jest environment
15080
+ // Note: [🔘] Maybe same problem as Gemini
15081
15081
  return null;
15082
15082
  }
15083
15083
  // Note: Note using `process.env` BUT `env` to pass in the environment variables dynamically
15084
- if (typeof env.GOOGLE_GENERATIVE_AI_API_KEY === 'string') {
15084
+ if (typeof env.DEEPSEEK_GENERATIVE_AI_API_KEY === 'string') {
15085
15085
  return {
15086
- title: 'Google Gemini (from env)',
15087
- packageName: '@promptbook/google',
15088
- className: 'GoogleExecutionTools',
15086
+ title: 'Deepseek (from env)',
15087
+ packageName: '@promptbook/deepseek',
15088
+ className: 'DeepseekExecutionTools',
15089
15089
  options: {
15090
- apiKey: env.GOOGLE_GENERATIVE_AI_API_KEY,
15090
+ apiKey: env.DEEPSEEK_GENERATIVE_AI_API_KEY,
15091
15091
  },
15092
15092
  };
15093
15093
  }
@@ -15268,6 +15268,98 @@ function createExecutionToolsFromVercelProvider(options) {
15268
15268
  };
15269
15269
  }
15270
15270
 
15271
+ /**
15272
+ * Execution Tools for calling Deepseek API.
15273
+ *
15274
+ * @public exported from `@promptbook/deepseek`
15275
+ */
15276
+ var createDeepseekExecutionTools = Object.assign(function (options) {
15277
+ if ($isRunningInJest()) {
15278
+ // Note: [🔘]
15279
+ throw new Error('DeepseekExecutionTools are not supported in Jest environment');
15280
+ }
15281
+ // Note: [🔘] Maybe there is same compatibility problem as in '@ai-sdk/deepseek'
15282
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
15283
+ var createDeepSeek = require('@ai-sdk/deepseek').createDeepSeek;
15284
+ var deepseekVercelProvider = createDeepSeek(__assign({}, options));
15285
+ return createExecutionToolsFromVercelProvider(__assign({ title: 'Deepseek', description: 'Implementation of Deepseek models', vercelProvider: deepseekVercelProvider, availableModels: [
15286
+ // TODO: [🕘] Maybe list models in same way as in other providers - in separate file with metadata
15287
+ 'deepseek-chat',
15288
+ 'deepseek-reasoner',
15289
+ // <- TODO: !!!!!! Picking of default model
15290
+ ].map(function (modelName) { return ({ modelName: modelName, modelVariant: 'CHAT' }); }) }, options));
15291
+ }, {
15292
+ packageName: '@promptbook/deepseek',
15293
+ className: 'DeepseekExecutionTools',
15294
+ });
15295
+ /**
15296
+ * TODO: [🎶] Naming "constructor" vs "creator" vs "factory"
15297
+ */
15298
+
15299
+ /**
15300
+ * Registration of LLM provider
15301
+ *
15302
+ * Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools
15303
+ *
15304
+ * @public exported from `@promptbook/deepseek`
15305
+ * @public exported from `@promptbook/wizzard`
15306
+ * @public exported from `@promptbook/cli`
15307
+ */
15308
+ var _DeepseekRegistration = $llmToolsRegister.register(createDeepseekExecutionTools);
15309
+ /**
15310
+ * TODO: [🎶] Naming "constructor" vs "creator" vs "factory"
15311
+ * Note: [💞] Ignore a discrepancy between file name and entity name
15312
+ */
15313
+
15314
+ /**
15315
+ * Registration of LLM provider metadata
15316
+ *
15317
+ * Warning: This is not useful for the end user, it is just a side effect of the mechanism that handles all available LLM tools
15318
+ *
15319
+ * @public exported from `@promptbook/core`
15320
+ * @public exported from `@promptbook/wizzard`
15321
+ * @public exported from `@promptbook/cli`
15322
+ */
15323
+ var _GoogleMetadataRegistration = $llmToolsMetadataRegister.register({
15324
+ title: 'Google Gemini',
15325
+ packageName: '@promptbook/google',
15326
+ className: 'GoogleExecutionTools',
15327
+ envVariables: ['GOOGLE_GENERATIVE_AI_API_KEY'],
15328
+ getBoilerplateConfiguration: function () {
15329
+ return {
15330
+ title: 'Google Gemini (boilerplate)',
15331
+ packageName: '@promptbook/google',
15332
+ className: 'GoogleExecutionTools',
15333
+ options: {
15334
+ apiKey: 'AI',
15335
+ },
15336
+ };
15337
+ },
15338
+ createConfigurationFromEnv: function (env) {
15339
+ if ($isRunningInJest()
15340
+ // <- TODO: Maybe check `env.JEST_WORKER_ID` directly here or pass `env` into `$isRunningInJest`
15341
+ ) {
15342
+ // Note: [🔘] Gemini makes problems in Jest environment
15343
+ return null;
15344
+ }
15345
+ // Note: Note using `process.env` BUT `env` to pass in the environment variables dynamically
15346
+ if (typeof env.GOOGLE_GENERATIVE_AI_API_KEY === 'string') {
15347
+ return {
15348
+ title: 'Google Gemini (from env)',
15349
+ packageName: '@promptbook/google',
15350
+ className: 'GoogleExecutionTools',
15351
+ options: {
15352
+ apiKey: env.GOOGLE_GENERATIVE_AI_API_KEY,
15353
+ },
15354
+ };
15355
+ }
15356
+ return null;
15357
+ },
15358
+ });
15359
+ /**
15360
+ * Note: [💞] Ignore a discrepancy between file name and entity name
15361
+ */
15362
+
15271
15363
  /**
15272
15364
  * Execution Tools for calling Google Gemini API.
15273
15365
  *
@@ -17501,5 +17593,5 @@ var _WebsiteScraperRegistration = $scrapersRegister.register(createWebsiteScrape
17501
17593
  * Note: [💞] Ignore a discrepancy between file name and entity name
17502
17594
  */
17503
17595
 
17504
- export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION, _AnthropicClaudeMetadataRegistration, _AnthropicClaudeRegistration, _AzureOpenAiMetadataRegistration, _AzureOpenAiRegistration, _BoilerplateScraperMetadataRegistration, _BoilerplateScraperRegistration, _CLI, _DocumentScraperMetadataRegistration, _DocumentScraperRegistration, _GoogleMetadataRegistration, _GoogleRegistration, _LegacyDocumentScraperMetadataRegistration, _LegacyDocumentScraperRegistration, _MarkdownScraperMetadataRegistration, _MarkdownScraperRegistration, _MarkitdownScraperMetadataRegistration, _MarkitdownScraperRegistration, _OpenAiAssistantMetadataRegistration, _OpenAiAssistantRegistration, _OpenAiMetadataRegistration, _OpenAiRegistration, _PdfScraperMetadataRegistration, _PdfScraperRegistration, _WebsiteScraperMetadataRegistration, _WebsiteScraperRegistration };
17596
+ export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION, _AnthropicClaudeMetadataRegistration, _AnthropicClaudeRegistration, _AzureOpenAiMetadataRegistration, _AzureOpenAiRegistration, _BoilerplateScraperMetadataRegistration, _BoilerplateScraperRegistration, _CLI, _DeepseekMetadataRegistration, _DeepseekRegistration, _DocumentScraperMetadataRegistration, _DocumentScraperRegistration, _GoogleMetadataRegistration, _GoogleRegistration, _LegacyDocumentScraperMetadataRegistration, _LegacyDocumentScraperRegistration, _MarkdownScraperMetadataRegistration, _MarkdownScraperRegistration, _MarkitdownScraperMetadataRegistration, _MarkitdownScraperRegistration, _OpenAiAssistantMetadataRegistration, _OpenAiAssistantRegistration, _OpenAiMetadataRegistration, _OpenAiRegistration, _PdfScraperMetadataRegistration, _PdfScraperRegistration, _WebsiteScraperMetadataRegistration, _WebsiteScraperRegistration };
17505
17597
  //# sourceMappingURL=index.es.js.map