@promptbook/browser 0.112.0-51 → 0.112.0-52

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
@@ -29,7 +29,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
29
29
  * @generated
30
30
  * @see https://github.com/webgptorg/promptbook
31
31
  */
32
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-51';
32
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-52';
33
33
  /**
34
34
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
35
35
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -12533,9 +12533,7 @@ function createSerpSearchToolFunction(toolName, resultLabel) {
12533
12533
  const searchEngine = new SerpSearchEngine();
12534
12534
  const results = await searchEngine.search(query, searchOptions);
12535
12535
  return spaceTrim$1((block) => `
12536
- ${resultLabel} results for "${query}"${Object.keys(searchOptions).length === 0
12537
- ? ''
12538
- : ` with options ${JSON.stringify(searchOptions)}`}:
12536
+ ${resultLabel} results for "${query}"${Object.keys(searchOptions).length === 0 ? '' : ` with options ${JSON.stringify(searchOptions)}`}:
12539
12537
 
12540
12538
  ${block(results
12541
12539
  .map((result) => spaceTrim$1(`
@@ -27883,7 +27881,9 @@ function createDeepSearchAgentInstructions(toolDescription) {
27883
27881
  * @private helper of `OpenAiAgentKitExecutionTools`
27884
27882
  */
27885
27883
  function buildDeepSearchToolInput(rawInput) {
27886
- const input = rawInput && typeof rawInput === 'object' ? rawInput : {};
27884
+ const input = rawInput && typeof rawInput === 'object'
27885
+ ? rawInput
27886
+ : {};
27887
27887
  const query = typeof input.query === 'string' ? input.query.trim() : '';
27888
27888
  const additionalHints = Object.entries(input)
27889
27889
  .filter(([key, value]) => key !== 'query' && value !== undefined && value !== null && String(value).trim() !== '')
@@ -30324,8 +30324,7 @@ class AgentLlmExecutionTools {
30324
30324
  console.info('[🤰]', 'Prepared OpenAI Assistant prompt', {
30325
30325
  agent: this.title,
30326
30326
  toolNames: (_b = (_a = promptWithAgentModelRequirementsForOpenAiAssistantExecutionTools.modelRequirements.tools) === null || _a === void 0 ? void 0 : _a.map((tool) => tool.name)) !== null && _b !== void 0 ? _b : [],
30327
- knowledgeSourcesCount: (_d = (_c = promptWithAgentModelRequirementsForOpenAiAssistantExecutionTools.modelRequirements
30328
- .knowledgeSources) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0,
30327
+ knowledgeSourcesCount: (_d = (_c = promptWithAgentModelRequirementsForOpenAiAssistantExecutionTools.modelRequirements.knowledgeSources) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0,
30329
30328
  });
30330
30329
  }
30331
30330
  return assistant.callChatModelStream(promptWithAgentModelRequirementsForOpenAiAssistantExecutionTools, options.onProgress, options.streamOptions);