@promptbook/openai 0.112.0-58 → 0.112.0-60
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 +9 -5
- package/esm/index.es.js.map +1 -1
- package/esm/src/book-components/BookEditor/useBookEditorMonacoInteractions.d.ts +40 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoLifecycle.d.ts +34 -0
- package/esm/src/commitments/_base/BaseCommitmentDefinition.d.ts +26 -0
- package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +2 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +9 -5
- package/umd/index.umd.js.map +1 -1
- package/umd/src/book-components/BookEditor/useBookEditorMonacoInteractions.d.ts +40 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoLifecycle.d.ts +34 -0
- package/umd/src/commitments/_base/BaseCommitmentDefinition.d.ts +26 -0
- package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +2 -0
- package/umd/src/version.d.ts +1 -1
package/esm/index.es.js
CHANGED
|
@@ -23,7 +23,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
23
23
|
* @generated
|
|
24
24
|
* @see https://github.com/webgptorg/promptbook
|
|
25
25
|
*/
|
|
26
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
26
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-60';
|
|
27
27
|
/**
|
|
28
28
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
29
29
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -7891,8 +7891,8 @@ class OpenAiAgentKitExecutionTools extends OpenAiVectorStoreHandler {
|
|
|
7891
7891
|
* Prepares an AgentKit agent with optional knowledge sources and tool definitions.
|
|
7892
7892
|
*/
|
|
7893
7893
|
async prepareAgentKitAgent(options) {
|
|
7894
|
-
var _a, _b;
|
|
7895
|
-
const { name, instructions, knowledgeSources, tools, vectorStoreId: cachedVectorStoreId, storeAsPrepared, } = options;
|
|
7894
|
+
var _a, _b, _c;
|
|
7895
|
+
const { name, instructions, knowledgeSources, tools, nativeAgentKitTools, vectorStoreId: cachedVectorStoreId, storeAsPrepared, } = options;
|
|
7896
7896
|
await this.ensureAgentKitDefaults();
|
|
7897
7897
|
if (this.options.isVerbose) {
|
|
7898
7898
|
console.info('[🤰]', 'Preparing OpenAI AgentKit agent', {
|
|
@@ -7900,6 +7900,7 @@ class OpenAiAgentKitExecutionTools extends OpenAiVectorStoreHandler {
|
|
|
7900
7900
|
instructionsLength: instructions.length,
|
|
7901
7901
|
knowledgeSourcesCount: (_a = knowledgeSources === null || knowledgeSources === void 0 ? void 0 : knowledgeSources.length) !== null && _a !== void 0 ? _a : 0,
|
|
7902
7902
|
toolsCount: (_b = tools === null || tools === void 0 ? void 0 : tools.length) !== null && _b !== void 0 ? _b : 0,
|
|
7903
|
+
nativeAgentKitToolsCount: (_c = nativeAgentKitTools === null || nativeAgentKitTools === void 0 ? void 0 : nativeAgentKitTools.length) !== null && _c !== void 0 ? _c : 0,
|
|
7903
7904
|
});
|
|
7904
7905
|
}
|
|
7905
7906
|
let vectorStoreId = cachedVectorStoreId;
|
|
@@ -7918,7 +7919,7 @@ class OpenAiAgentKitExecutionTools extends OpenAiVectorStoreHandler {
|
|
|
7918
7919
|
vectorStoreId,
|
|
7919
7920
|
});
|
|
7920
7921
|
}
|
|
7921
|
-
const agentKitTools = this.buildAgentKitTools({ tools, vectorStoreId });
|
|
7922
|
+
const agentKitTools = this.buildAgentKitTools({ tools, nativeAgentKitTools, vectorStoreId });
|
|
7922
7923
|
const openAiAgentKitAgent = new Agent({
|
|
7923
7924
|
name,
|
|
7924
7925
|
model: this.agentKitModelName,
|
|
@@ -7957,11 +7958,14 @@ class OpenAiAgentKitExecutionTools extends OpenAiVectorStoreHandler {
|
|
|
7957
7958
|
* Builds the tool list for AgentKit, including hosted file search when applicable.
|
|
7958
7959
|
*/
|
|
7959
7960
|
buildAgentKitTools(options) {
|
|
7960
|
-
const { tools, vectorStoreId } = options;
|
|
7961
|
+
const { tools, nativeAgentKitTools, vectorStoreId } = options;
|
|
7961
7962
|
const agentKitTools = [];
|
|
7962
7963
|
if (vectorStoreId) {
|
|
7963
7964
|
agentKitTools.push(fileSearchTool(vectorStoreId));
|
|
7964
7965
|
}
|
|
7966
|
+
if (nativeAgentKitTools && nativeAgentKitTools.length > 0) {
|
|
7967
|
+
agentKitTools.push(...nativeAgentKitTools);
|
|
7968
|
+
}
|
|
7965
7969
|
if (tools && tools.length > 0) {
|
|
7966
7970
|
let scriptTools = null;
|
|
7967
7971
|
for (const toolDefinition of tools) {
|