@promptbook/core 0.110.0-1 → 0.110.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/esm/index.es.js CHANGED
@@ -27,7 +27,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
27
27
  * @generated
28
28
  * @see https://github.com/webgptorg/promptbook
29
29
  */
30
- const PROMPTBOOK_ENGINE_VERSION = '0.110.0-1';
30
+ const PROMPTBOOK_ENGINE_VERSION = '0.110.0-3';
31
31
  /**
32
32
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
33
33
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -23645,6 +23645,7 @@ class OpenAiAssistantExecutionTools extends OpenAiExecutionTools {
23645
23645
  getAssistant(assistantId) {
23646
23646
  return new OpenAiAssistantExecutionTools({
23647
23647
  ...this.options,
23648
+ isCreatingNewAssistantsAllowed: this.isCreatingNewAssistantsAllowed,
23648
23649
  assistantId,
23649
23650
  });
23650
23651
  }
@@ -24298,6 +24299,11 @@ class AgentLlmExecutionTools {
24298
24299
  requirementsHash,
24299
24300
  });
24300
24301
  }
24302
+ // [0] Expose prepared externals
24303
+ if (this.preparedExternals) {
24304
+ this /* <- TODO: !!!!!! Remove */.preparedExternals.openaiAssistantId =
24305
+ assistant.assistantId;
24306
+ }
24301
24307
  // Create modified chat prompt with agent system message specific to OpenAI Assistant
24302
24308
  const promptWithAgentModelRequirementsForOpenAiAssistantExecutionTools = {
24303
24309
  ...promptWithAgentModelRequirements,
@@ -24490,6 +24496,10 @@ class Agent extends AgentLlmExecutionTools {
24490
24496
  * Human-readable titles for tool functions
24491
24497
  */
24492
24498
  this.toolTitles = {};
24499
+ /**
24500
+ * Externals prepared for the agent, like OpenAI assistant, etc.
24501
+ */
24502
+ this.preparedExternals = {};
24493
24503
  // TODO: [🐱‍🚀] Add `Agent` simple "mocked" learning by appending to agent source
24494
24504
  // TODO: [🐱‍🚀] Add `Agent` learning by promptbookAgent
24495
24505
  this.teacherAgent = options.teacherAgent;
@@ -25553,6 +25563,7 @@ const _OpenAiAssistantMetadataRegistration = $llmToolsMetadataRegister.register(
25553
25563
  apiKey: 'sk-',
25554
25564
  assistantId: 'asst_',
25555
25565
  maxRequestsPerMinute: DEFAULT_MAX_REQUESTS_PER_MINUTE,
25566
+ isCreatingNewAssistantsAllowed: false,
25556
25567
  },
25557
25568
  };
25558
25569
  },