@promptbook/node 0.110.0-4 → 0.110.0-5
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 +711 -438
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/openai.index.d.ts +0 -4
- package/esm/typings/src/_packages/types.index.d.ts +0 -2
- package/esm/typings/src/llm-providers/agent/Agent.d.ts +0 -1
- package/esm/typings/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +0 -1
- package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +40 -1
- package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionToolsOptions.d.ts +30 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +711 -438
- package/umd/index.umd.js.map +1 -1
- package/esm/typings/src/llm-providers/openai/OpenAiAgentExecutionTools.d.ts +0 -43
- package/esm/typings/src/llm-providers/openai/createOpenAiAgentExecutionTools.d.ts +0 -11
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
|
|
2
|
-
import { createOpenAiAgentExecutionTools } from '../llm-providers/openai/createOpenAiAgentExecutionTools';
|
|
3
2
|
import { createOpenAiAssistantExecutionTools } from '../llm-providers/openai/createOpenAiAssistantExecutionTools';
|
|
4
3
|
import { createOpenAiCompatibleExecutionTools } from '../llm-providers/openai/createOpenAiCompatibleExecutionTools';
|
|
5
4
|
import { createOpenAiExecutionTools } from '../llm-providers/openai/createOpenAiExecutionTools';
|
|
6
5
|
import { OPENAI_MODELS } from '../llm-providers/openai/openai-models';
|
|
7
|
-
import { OpenAiAgentExecutionTools } from '../llm-providers/openai/OpenAiAgentExecutionTools';
|
|
8
6
|
import { OpenAiAssistantExecutionTools } from '../llm-providers/openai/OpenAiAssistantExecutionTools';
|
|
9
7
|
import type { OpenAiAssistantExecutionToolsOptions } from '../llm-providers/openai/OpenAiAssistantExecutionToolsOptions';
|
|
10
8
|
import { OpenAiCompatibleExecutionTools } from '../llm-providers/openai/OpenAiCompatibleExecutionTools';
|
|
@@ -17,12 +15,10 @@ import { _OpenAiRegistration } from '../llm-providers/openai/register-constructo
|
|
|
17
15
|
import { _OpenAiAssistantRegistration } from '../llm-providers/openai/register-constructor';
|
|
18
16
|
import { _OpenAiCompatibleRegistration } from '../llm-providers/openai/register-constructor';
|
|
19
17
|
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
|
20
|
-
export { createOpenAiAgentExecutionTools };
|
|
21
18
|
export { createOpenAiAssistantExecutionTools };
|
|
22
19
|
export { createOpenAiCompatibleExecutionTools };
|
|
23
20
|
export { createOpenAiExecutionTools };
|
|
24
21
|
export { OPENAI_MODELS };
|
|
25
|
-
export { OpenAiAgentExecutionTools };
|
|
26
22
|
export { OpenAiAssistantExecutionTools };
|
|
27
23
|
export type { OpenAiAssistantExecutionToolsOptions };
|
|
28
24
|
export { OpenAiCompatibleExecutionTools };
|
|
@@ -138,7 +138,6 @@ import type { AzureOpenAiExecutionToolsOptions } from '../llm-providers/azure-op
|
|
|
138
138
|
import type { DeepseekExecutionToolsOptions } from '../llm-providers/deepseek/DeepseekExecutionToolsOptions';
|
|
139
139
|
import type { GoogleExecutionToolsOptions } from '../llm-providers/google/GoogleExecutionToolsOptions';
|
|
140
140
|
import type { OllamaExecutionToolsOptions } from '../llm-providers/ollama/OllamaExecutionToolsOptions';
|
|
141
|
-
import type { OpenAiAgentExecutionToolsOptions } from '../llm-providers/openai/OpenAiAgentExecutionTools';
|
|
142
141
|
import type { OpenAiAssistantExecutionToolsOptions } from '../llm-providers/openai/OpenAiAssistantExecutionToolsOptions';
|
|
143
142
|
import type { OpenAiCompatibleExecutionToolsOptions } from '../llm-providers/openai/OpenAiCompatibleExecutionToolsOptions';
|
|
144
143
|
import type { OpenAiCompatibleExecutionToolsNonProxiedOptions } from '../llm-providers/openai/OpenAiCompatibleExecutionToolsOptions';
|
|
@@ -540,7 +539,6 @@ export type { AzureOpenAiExecutionToolsOptions };
|
|
|
540
539
|
export type { DeepseekExecutionToolsOptions };
|
|
541
540
|
export type { GoogleExecutionToolsOptions };
|
|
542
541
|
export type { OllamaExecutionToolsOptions };
|
|
543
|
-
export type { OpenAiAgentExecutionToolsOptions };
|
|
544
542
|
export type { OpenAiAssistantExecutionToolsOptions };
|
|
545
543
|
export type { OpenAiCompatibleExecutionToolsOptions };
|
|
546
544
|
export type { OpenAiCompatibleExecutionToolsNonProxiedOptions };
|
|
@@ -14,7 +14,6 @@ import type { AgentOptions } from './AgentOptions';
|
|
|
14
14
|
* - `Agent` - which represents an AI Agent with its source, memories, actions, etc. Agent is a higher-level abstraction which is internally using:
|
|
15
15
|
* - `LlmExecutionTools` - which wraps one or more LLM models and provides an interface to execute them
|
|
16
16
|
* - `AgentLlmExecutionTools` - which is a specific implementation of `LlmExecutionTools` that wraps another LlmExecutionTools and applies agent-specific system prompts and requirements
|
|
17
|
-
* - `OpenAiAgentExecutionTools` - which is a specific implementation of `LlmExecutionTools` for OpenAI models with agent capabilities (using Responses API), recommended for usage in `Agent` or `AgentLlmExecutionTools`
|
|
18
17
|
* - `OpenAiAssistantExecutionTools` - (Deprecated) which is a specific implementation of `LlmExecutionTools` for OpenAI models with assistant capabilities
|
|
19
18
|
* - `RemoteAgent` - which is an `Agent` that connects to a Promptbook Agents Server
|
|
20
19
|
*
|
|
@@ -16,7 +16,6 @@ import type { CreateAgentLlmExecutionToolsOptions } from './CreateAgentLlmExecut
|
|
|
16
16
|
* - `Agent` - which represents an AI Agent with its source, memories, actions, etc. Agent is a higher-level abstraction which is internally using:
|
|
17
17
|
* - `LlmExecutionTools` - which wraps one or more LLM models and provides an interface to execute them
|
|
18
18
|
* - `AgentLlmExecutionTools` - which is a specific implementation of `LlmExecutionTools` that wraps another LlmExecutionTools and applies agent-specific system prompts and requirements
|
|
19
|
-
* - `OpenAiAgentExecutionTools` - which is a specific implementation of `LlmExecutionTools` for OpenAI models with agent capabilities (using Responses API), recommended for usage in `Agent` or `AgentLlmExecutionTools`
|
|
20
19
|
* - `OpenAiAssistantExecutionTools` - (Deprecated) which is a specific implementation of `LlmExecutionTools` for OpenAI models with assistant capabilities
|
|
21
20
|
* - `RemoteAgent` - which is an `Agent` that connects to a Promptbook Agents Server
|
|
22
21
|
*
|
|
@@ -18,7 +18,6 @@ import { OpenAiExecutionTools } from './OpenAiExecutionTools';
|
|
|
18
18
|
* - `RemoteAgent` - which is an `Agent` that connects to a Promptbook Agents Server
|
|
19
19
|
*
|
|
20
20
|
* @public exported from `@promptbook/openai`
|
|
21
|
-
* @deprecated Use `OpenAiAgentExecutionTools` instead which uses the new OpenAI Responses API
|
|
22
21
|
*/
|
|
23
22
|
export declare class OpenAiAssistantExecutionTools extends OpenAiExecutionTools implements LlmExecutionTools {
|
|
24
23
|
readonly assistantId: string_token;
|
|
@@ -43,6 +42,46 @@ export declare class OpenAiAssistantExecutionTools extends OpenAiExecutionTools
|
|
|
43
42
|
* Get an existing assistant tool wrapper
|
|
44
43
|
*/
|
|
45
44
|
getAssistant(assistantId: string_token): OpenAiAssistantExecutionTools;
|
|
45
|
+
/**
|
|
46
|
+
* Returns the per-knowledge-source download timeout in milliseconds.
|
|
47
|
+
*/
|
|
48
|
+
private getKnowledgeSourceDownloadTimeoutMs;
|
|
49
|
+
/**
|
|
50
|
+
* Returns the max concurrency for knowledge source uploads.
|
|
51
|
+
*/
|
|
52
|
+
private getKnowledgeSourceUploadMaxConcurrency;
|
|
53
|
+
/**
|
|
54
|
+
* Returns the polling interval in milliseconds for vector store uploads.
|
|
55
|
+
*/
|
|
56
|
+
private getKnowledgeSourceUploadPollIntervalMs;
|
|
57
|
+
/**
|
|
58
|
+
* Returns the overall upload timeout in milliseconds for vector store uploads.
|
|
59
|
+
*/
|
|
60
|
+
private getKnowledgeSourceUploadTimeoutMs;
|
|
61
|
+
/**
|
|
62
|
+
* Returns true if we should continue even if vector store ingestion stalls.
|
|
63
|
+
*/
|
|
64
|
+
private shouldContinueOnVectorStoreStall;
|
|
65
|
+
/**
|
|
66
|
+
* Returns assistant-specific options with extended settings.
|
|
67
|
+
*/
|
|
68
|
+
private get assistantOptions();
|
|
69
|
+
/**
|
|
70
|
+
* Downloads a knowledge source URL into a File for vector store upload.
|
|
71
|
+
*/
|
|
72
|
+
private downloadKnowledgeSourceFile;
|
|
73
|
+
/**
|
|
74
|
+
* Logs vector store file batch diagnostics to help trace ingestion stalls or failures.
|
|
75
|
+
*/
|
|
76
|
+
private logVectorStoreFileBatchDiagnostics;
|
|
77
|
+
/**
|
|
78
|
+
* Uploads knowledge source files to the vector store and polls until processing completes.
|
|
79
|
+
*/
|
|
80
|
+
private uploadKnowledgeSourceFilesToVectorStore;
|
|
81
|
+
/**
|
|
82
|
+
* Creates a vector store and uploads knowledge sources, returning its ID.
|
|
83
|
+
*/
|
|
84
|
+
private createVectorStoreWithKnowledgeSources;
|
|
46
85
|
createNewAssistant(options: {
|
|
47
86
|
/**
|
|
48
87
|
* Name of the new assistant
|
|
@@ -17,4 +17,34 @@ export type OpenAiAssistantExecutionToolsOptions = OpenAiCompatibleExecutionTool
|
|
|
17
17
|
* Which assistant to use
|
|
18
18
|
*/
|
|
19
19
|
readonly assistantId: string_token;
|
|
20
|
+
/**
|
|
21
|
+
* Per-knowledge-source download timeout in milliseconds when preparing assistants.
|
|
22
|
+
*
|
|
23
|
+
* @default 30000
|
|
24
|
+
*/
|
|
25
|
+
readonly knowledgeSourceDownloadTimeoutMs?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Max concurrency for uploading knowledge source files to the vector store.
|
|
28
|
+
*
|
|
29
|
+
* @default 5
|
|
30
|
+
*/
|
|
31
|
+
readonly knowledgeSourceUploadMaxConcurrency?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Poll interval in milliseconds when waiting for vector store file batch processing.
|
|
34
|
+
*
|
|
35
|
+
* @default 5000
|
|
36
|
+
*/
|
|
37
|
+
readonly knowledgeSourceUploadPollIntervalMs?: number;
|
|
38
|
+
/**
|
|
39
|
+
* Overall timeout in milliseconds for vector store file batch processing.
|
|
40
|
+
*
|
|
41
|
+
* @default 900000
|
|
42
|
+
*/
|
|
43
|
+
readonly knowledgeSourceUploadTimeoutMs?: number;
|
|
44
|
+
/**
|
|
45
|
+
* Whether we should continue even if vector store ingestion stalls.
|
|
46
|
+
*
|
|
47
|
+
* @default true
|
|
48
|
+
*/
|
|
49
|
+
readonly shouldContinueOnVectorStoreStall?: boolean;
|
|
20
50
|
};
|
|
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
|
|
|
15
15
|
export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
|
|
16
16
|
/**
|
|
17
17
|
* Represents the version string of the Promptbook engine.
|
|
18
|
-
* It follows semantic versioning (e.g., `0.110.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.110.0-4`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/node",
|
|
3
|
-
"version": "0.110.0-
|
|
3
|
+
"version": "0.110.0-5",
|
|
4
4
|
"description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"module": "./esm/index.es.js",
|
|
94
94
|
"typings": "./esm/typings/src/_packages/node.index.d.ts",
|
|
95
95
|
"peerDependencies": {
|
|
96
|
-
"@promptbook/core": "0.110.0-
|
|
96
|
+
"@promptbook/core": "0.110.0-5"
|
|
97
97
|
},
|
|
98
98
|
"dependencies": {
|
|
99
99
|
"@mozilla/readability": "0.6.0",
|