@nocobase/plugin-ai 2.1.0-alpha.20 → 2.1.0-alpha.22
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/dist/ai/{ai-employees/cole.d.ts → tools/knowledge-base-retrieve.d.ts} +1 -1
- package/dist/ai/tools/knowledge-base-retrieve.js +94 -0
- package/dist/client/486.77c26e2e7f8daf28.js +10 -0
- package/dist/client/646.ef9d7c2ea8641044.js +10 -0
- package/dist/client/ai-employees/chatbox/AIEmployeeSwitch.d.ts +3 -1
- package/dist/client/ai-employees/chatbox/HintMessageHeader.d.ts +10 -0
- package/dist/client/ai-employees/chatbox/ModelSwitcher.d.ts +3 -1
- package/dist/client/ai-employees/chatbox/SearchSwitch.d.ts +3 -1
- package/dist/client/ai-employees/chatbox/Upload.d.ts +3 -1
- package/dist/client/ai-employees/chatbox/conversations/ConversationsList.d.ts +27 -0
- package/dist/client/ai-employees/chatbox/conversations/WorkflowTasksList.d.ts +31 -0
- package/dist/client/ai-employees/chatbox/conversations/common.d.ts +43 -0
- package/dist/{server/document-loader/loader.worker.d.ts → client/ai-employees/chatbox/conversations/index.d.ts} +1 -1
- package/dist/client/ai-employees/chatbox/hooks/useWorkflowTasks.d.ts +24 -0
- package/dist/client/ai-employees/chatbox/stores/chat-box.d.ts +8 -0
- package/dist/client/ai-employees/chatbox/stores/chat-conversations.d.ts +4 -0
- package/dist/client/ai-employees/chatbox/stores/workflow-tasks.d.ts +41 -0
- package/dist/client/ai-employees/workflow-tasks/tools/index.d.ts +10 -0
- package/dist/client/ai-employees/workflow-tasks/ui/WorkflowTaskOutputCard.d.ts +11 -0
- package/dist/client/components/ListCollapse.d.ts +28 -0
- package/dist/client/index.js +7 -7
- package/dist/client/repositories/AIConfigRepository.d.ts +3 -2
- package/dist/client/workflow/nodes/employee/components/AIEmployeeSelect.d.ts +10 -0
- package/dist/client/workflow/nodes/employee/components/assigness.d.ts +11 -0
- package/dist/client/workflow/nodes/employee/components/file-inputs.d.ts +10 -0
- package/dist/client/workflow/nodes/employee/components/message-inputs.d.ts +12 -0
- package/dist/client/workflow/nodes/employee/components/model-options.d.ts +10 -0
- package/dist/client/workflow/nodes/employee/components/skill-settings.d.ts +10 -0
- package/dist/client/workflow/nodes/employee/components/structured-output.d.ts +10 -0
- package/dist/client/workflow/nodes/employee/components/users-select.d.ts +15 -0
- package/dist/client/workflow/nodes/employee/components/web-search-options.d.ts +10 -0
- package/dist/client/workflow/nodes/employee/configuration.d.ts +12 -0
- package/dist/client/workflow/nodes/employee/flow-models/feedback.d.ts +13 -0
- package/dist/client/workflow/nodes/employee/flow-models/task.d.ts +13 -0
- package/dist/client/workflow/nodes/employee/index.d.ts +7 -31
- package/dist/externalVersion.js +14 -15
- package/dist/locale/en-US.json +44 -1
- package/dist/locale/zh-CN.json +45 -1
- package/dist/node_modules/fast-glob/out/index.js +8 -8
- package/dist/node_modules/fast-glob/package.json +1 -1
- package/dist/node_modules/flexsearch/dist/flexsearch.bundle.min.js +2 -2
- package/dist/node_modules/flexsearch/package.json +1 -1
- package/dist/node_modules/fs-extra/lib/index.js +1 -1
- package/dist/node_modules/fs-extra/package.json +1 -1
- package/dist/node_modules/nodejs-snowflake/nodejs_snowflake.js +1 -1
- package/dist/node_modules/nodejs-snowflake/package.json +1 -1
- package/dist/node_modules/openai/index.js +1 -1
- package/dist/node_modules/openai/package.json +1 -1
- package/dist/node_modules/zod/index.cjs +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/ai-employees/ai-conversations.d.ts +10 -4
- package/dist/server/ai-employees/ai-conversations.js +52 -14
- package/dist/server/ai-employees/ai-employee.d.ts +8 -10
- package/dist/server/ai-employees/ai-employee.js +130 -145
- package/dist/server/ai-employees/ai-knowledge-base.d.ts +28 -0
- package/dist/server/ai-employees/ai-knowledge-base.js +167 -0
- package/dist/server/ai-employees/middleware/index.d.ts +1 -0
- package/dist/server/ai-employees/middleware/index.js +3 -1
- package/dist/server/ai-employees/middleware/workflow-history.d.ts +22 -0
- package/dist/server/ai-employees/middleware/workflow-history.js +173 -0
- package/dist/server/collections/ai-conversations.js +12 -0
- package/dist/server/collections/ai-workflow-tasks.d.ts +10 -0
- package/dist/server/collections/ai-workflow-tasks.js +112 -0
- package/dist/server/collections/users-ai-workflow-tasks.d.ts +10 -0
- package/dist/server/collections/users-ai-workflow-tasks.js +44 -0
- package/dist/server/document-loader/constants.d.ts +1 -2
- package/dist/server/document-loader/constants.js +6 -1
- package/dist/server/document-loader/loader.d.ts +0 -1
- package/dist/server/document-loader/loader.js +2 -55
- package/dist/server/document-loader/types.d.ts +0 -1
- package/dist/server/llm-providers/provider.js +1 -1
- package/dist/server/manager/built-in-manager.js +5 -4
- package/dist/server/migrations/20260424000000-remove-cole-ai-employee.d.ts +14 -0
- package/dist/server/migrations/20260424000000-remove-cole-ai-employee.js +48 -0
- package/dist/server/plugin.d.ts +2 -0
- package/dist/server/plugin.js +10 -0
- package/dist/server/resource/aiConversations.js +29 -35
- package/dist/server/resource/aiWorkflowTasks.d.ts +12 -0
- package/dist/server/resource/aiWorkflowTasks.js +290 -0
- package/dist/server/utils.js +3 -2
- package/dist/server/workflow/nodes/employee/files.d.ts +16 -0
- package/dist/server/workflow/nodes/employee/files.js +125 -0
- package/dist/server/workflow/nodes/employee/handler.d.ts +11 -0
- package/dist/server/workflow/nodes/employee/handler.js +107 -0
- package/dist/server/workflow/nodes/employee/index.d.ts +17 -0
- package/dist/server/workflow/nodes/employee/index.js +391 -0
- package/dist/server/workflow/nodes/employee/tools.d.ts +12 -0
- package/dist/server/workflow/nodes/employee/tools.js +133 -0
- package/dist/server/workflow/nodes/employee/types.d.ts +35 -0
- package/dist/server/workflow/nodes/employee/types.js +24 -0
- package/dist/server/workflow/utils.d.ts +14 -0
- package/dist/server/workflow/utils.js +111 -0
- package/package.json +2 -2
- package/dist/ai/ai-employees/cole.js +0 -60
- package/dist/client/30.4f30511a3059c422.js +0 -10
- package/dist/server/document-loader/loader.worker.js +0 -68
- package/dist/server/document-loader/vendor/langchain/document_loaders/fs/text.d.ts +0 -20
- package/dist/server/document-loader/vendor/langchain/document_loaders/fs/text.js +0 -96
- /package/dist/client/ai-employees/chatbox/{Conversations.d.ts → conversations/Conversations.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"zod","version":"4.3.5","type":"module","license":"MIT","author":"Colin McDonnell <zod@colinhacks.com>","description":"TypeScript-first schema declaration and validation library with static type inference","homepage":"https://zod.dev","llms":"https://zod.dev/llms.txt","llmsFull":"https://zod.dev/llms-full.txt","mcpServer":"https://mcp.inkeep.com/zod/mcp","funding":"https://github.com/sponsors/colinhacks","sideEffects":false,"files":["src","**/*.js","**/*.mjs","**/*.cjs","**/*.d.ts","**/*.d.mts","**/*.d.cts","**/package.json"],"keywords":["typescript","schema","validation","type","inference"],"main":"./index.cjs","types":"./index.d.cts","module":"./index.js","zshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts","./mini":"./src/mini/index.ts","./locales":"./src/locales/index.ts","./v3":"./src/v3/index.ts","./v4":"./src/v4/index.ts","./v4-mini":"./src/v4-mini/index.ts","./v4/mini":"./src/v4/mini/index.ts","./v4/core":"./src/v4/core/index.ts","./v4/locales":"./src/v4/locales/index.ts","./v4/locales/*":"./src/v4/locales/*"},"conditions":{"@zod/source":"src"}},"exports":{"./package.json":"./package.json",".":{"@zod/source":"./src/index.ts","types":"./index.d.cts","import":"./index.js","require":"./index.cjs"},"./mini":{"@zod/source":"./src/mini/index.ts","types":"./mini/index.d.cts","import":"./mini/index.js","require":"./mini/index.cjs"},"./locales":{"@zod/source":"./src/locales/index.ts","types":"./locales/index.d.cts","import":"./locales/index.js","require":"./locales/index.cjs"},"./v3":{"@zod/source":"./src/v3/index.ts","types":"./v3/index.d.cts","import":"./v3/index.js","require":"./v3/index.cjs"},"./v4":{"@zod/source":"./src/v4/index.ts","types":"./v4/index.d.cts","import":"./v4/index.js","require":"./v4/index.cjs"},"./v4-mini":{"@zod/source":"./src/v4-mini/index.ts","types":"./v4-mini/index.d.cts","import":"./v4-mini/index.js","require":"./v4-mini/index.cjs"},"./v4/mini":{"@zod/source":"./src/v4/mini/index.ts","types":"./v4/mini/index.d.cts","import":"./v4/mini/index.js","require":"./v4/mini/index.cjs"},"./v4/core":{"@zod/source":"./src/v4/core/index.ts","types":"./v4/core/index.d.cts","import":"./v4/core/index.js","require":"./v4/core/index.cjs"},"./v4/locales":{"@zod/source":"./src/v4/locales/index.ts","types":"./v4/locales/index.d.cts","import":"./v4/locales/index.js","require":"./v4/locales/index.cjs"},"./v4/locales/*":{"@zod/source":"./src/v4/locales/*","types":"./v4/locales/*","import":"./v4/locales/*","require":"./v4/locales/*"}},"repository":{"type":"git","url":"git+https://github.com/colinhacks/zod.git"},"bugs":{"url":"https://github.com/colinhacks/zod/issues"},"support":{"backing":{"npm-funding":true}},"scripts":{"clean":"git clean -xdf . -e node_modules","build":"zshy --project tsconfig.build.json","postbuild":"tsx ../../scripts/write-stub-package-jsons.ts && pnpm biome check --write .","test:watch":"pnpm vitest","test":"pnpm vitest run","prepublishOnly":"tsx ../../scripts/check-versions.ts"},"_lastModified":"2026-04-
|
|
1
|
+
{"name":"zod","version":"4.3.5","type":"module","license":"MIT","author":"Colin McDonnell <zod@colinhacks.com>","description":"TypeScript-first schema declaration and validation library with static type inference","homepage":"https://zod.dev","llms":"https://zod.dev/llms.txt","llmsFull":"https://zod.dev/llms-full.txt","mcpServer":"https://mcp.inkeep.com/zod/mcp","funding":"https://github.com/sponsors/colinhacks","sideEffects":false,"files":["src","**/*.js","**/*.mjs","**/*.cjs","**/*.d.ts","**/*.d.mts","**/*.d.cts","**/package.json"],"keywords":["typescript","schema","validation","type","inference"],"main":"./index.cjs","types":"./index.d.cts","module":"./index.js","zshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts","./mini":"./src/mini/index.ts","./locales":"./src/locales/index.ts","./v3":"./src/v3/index.ts","./v4":"./src/v4/index.ts","./v4-mini":"./src/v4-mini/index.ts","./v4/mini":"./src/v4/mini/index.ts","./v4/core":"./src/v4/core/index.ts","./v4/locales":"./src/v4/locales/index.ts","./v4/locales/*":"./src/v4/locales/*"},"conditions":{"@zod/source":"src"}},"exports":{"./package.json":"./package.json",".":{"@zod/source":"./src/index.ts","types":"./index.d.cts","import":"./index.js","require":"./index.cjs"},"./mini":{"@zod/source":"./src/mini/index.ts","types":"./mini/index.d.cts","import":"./mini/index.js","require":"./mini/index.cjs"},"./locales":{"@zod/source":"./src/locales/index.ts","types":"./locales/index.d.cts","import":"./locales/index.js","require":"./locales/index.cjs"},"./v3":{"@zod/source":"./src/v3/index.ts","types":"./v3/index.d.cts","import":"./v3/index.js","require":"./v3/index.cjs"},"./v4":{"@zod/source":"./src/v4/index.ts","types":"./v4/index.d.cts","import":"./v4/index.js","require":"./v4/index.cjs"},"./v4-mini":{"@zod/source":"./src/v4-mini/index.ts","types":"./v4-mini/index.d.cts","import":"./v4-mini/index.js","require":"./v4-mini/index.cjs"},"./v4/mini":{"@zod/source":"./src/v4/mini/index.ts","types":"./v4/mini/index.d.cts","import":"./v4/mini/index.js","require":"./v4/mini/index.cjs"},"./v4/core":{"@zod/source":"./src/v4/core/index.ts","types":"./v4/core/index.d.cts","import":"./v4/core/index.js","require":"./v4/core/index.cjs"},"./v4/locales":{"@zod/source":"./src/v4/locales/index.ts","types":"./v4/locales/index.d.cts","import":"./v4/locales/index.js","require":"./v4/locales/index.cjs"},"./v4/locales/*":{"@zod/source":"./src/v4/locales/*","types":"./v4/locales/*","import":"./v4/locales/*","require":"./v4/locales/*"}},"repository":{"type":"git","url":"git+https://github.com/colinhacks/zod.git"},"bugs":{"url":"https://github.com/colinhacks/zod/issues"},"support":{"backing":{"npm-funding":true}},"scripts":{"clean":"git clean -xdf . -e node_modules","build":"zshy --project tsconfig.build.json","postbuild":"tsx ../../scripts/write-stub-package-jsons.ts && pnpm biome check --write .","test:watch":"pnpm vitest","test":"pnpm vitest run","prepublishOnly":"tsx ../../scripts/check-versions.ts"},"_lastModified":"2026-04-24T10:05:31.418Z"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
import { Model } from '@nocobase/database';
|
|
9
|
+
import { Model, Transaction } from '@nocobase/database';
|
|
10
10
|
import PluginAIServer from '../plugin';
|
|
11
11
|
import { AIMessage, SubAgentConversationMetadata, UserDecision } from '../types';
|
|
12
12
|
export type AIConversationsOptions = {
|
|
@@ -21,13 +21,15 @@ export type AIConversationFilterParams = {
|
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
export type CreateAIConversationParams = {
|
|
24
|
-
userId
|
|
24
|
+
userId?: string;
|
|
25
25
|
aiEmployee: {
|
|
26
26
|
username: string;
|
|
27
27
|
};
|
|
28
28
|
title?: string;
|
|
29
29
|
options?: AIConversationsOptions;
|
|
30
30
|
from?: 'main-agent' | 'sub-agent';
|
|
31
|
+
transaction?: Transaction;
|
|
32
|
+
category?: 'chat' | 'task';
|
|
31
33
|
};
|
|
32
34
|
export type UpdateAIConversationParams = {
|
|
33
35
|
userId: string;
|
|
@@ -50,13 +52,17 @@ export type GetAIConversationMessagesResult = {
|
|
|
50
52
|
export declare class AIConversationsManager {
|
|
51
53
|
protected plugin: PluginAIServer;
|
|
52
54
|
constructor(plugin: PluginAIServer);
|
|
53
|
-
create({ userId, aiEmployee, title, options, from }: CreateAIConversationParams): Promise<any>;
|
|
55
|
+
create({ userId, aiEmployee, title, options, from, transaction, category, }: CreateAIConversationParams): Promise<any>;
|
|
54
56
|
update({ userId, sessionId, title, options: inputOptions }: UpdateAIConversationParams): Promise<any>;
|
|
57
|
+
getConversation({ sessionId, userId }: {
|
|
58
|
+
sessionId: string;
|
|
59
|
+
userId?: string;
|
|
60
|
+
}): Promise<any>;
|
|
55
61
|
getMessages({ userId, sessionId, cursor, paginate, }: GetAIConversationMessagesParams): Promise<GetAIConversationMessagesResult>;
|
|
56
62
|
getUserDecisions(messageId: string): Promise<{
|
|
57
63
|
interruptId?: string;
|
|
58
64
|
decisions: UserDecision[];
|
|
59
|
-
} |
|
|
65
|
+
} | undefined>;
|
|
60
66
|
resolveSubAgentConversation(sessionId: string, toolCallId: string): Promise<SubAgentConversationMetadata>;
|
|
61
67
|
private get aiConversationsRepo();
|
|
62
68
|
private get aiMessagesRepo();
|
|
@@ -35,7 +35,15 @@ class AIConversationsManager {
|
|
|
35
35
|
constructor(plugin) {
|
|
36
36
|
this.plugin = plugin;
|
|
37
37
|
}
|
|
38
|
-
async create({
|
|
38
|
+
async create({
|
|
39
|
+
userId,
|
|
40
|
+
aiEmployee,
|
|
41
|
+
title,
|
|
42
|
+
options = {},
|
|
43
|
+
from = "main-agent",
|
|
44
|
+
transaction,
|
|
45
|
+
category = "chat"
|
|
46
|
+
}) {
|
|
39
47
|
return await this.aiConversationsRepo.create({
|
|
40
48
|
values: {
|
|
41
49
|
userId,
|
|
@@ -43,16 +51,16 @@ class AIConversationsManager {
|
|
|
43
51
|
aiEmployee,
|
|
44
52
|
options,
|
|
45
53
|
thread: 1,
|
|
46
|
-
from
|
|
47
|
-
|
|
54
|
+
from,
|
|
55
|
+
category
|
|
56
|
+
},
|
|
57
|
+
transaction
|
|
48
58
|
});
|
|
49
59
|
}
|
|
50
60
|
async update({ userId, sessionId, title, options: inputOptions }) {
|
|
51
|
-
const conversation = await this.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
userId
|
|
55
|
-
}
|
|
61
|
+
const conversation = await this.getConversation({
|
|
62
|
+
sessionId,
|
|
63
|
+
userId
|
|
56
64
|
});
|
|
57
65
|
if (!conversation) {
|
|
58
66
|
throw new Error("invalid sessionId");
|
|
@@ -80,17 +88,47 @@ class AIConversationsManager {
|
|
|
80
88
|
values
|
|
81
89
|
});
|
|
82
90
|
}
|
|
91
|
+
async getConversation({ sessionId, userId }) {
|
|
92
|
+
const conversation = await this.aiConversationsRepo.findOne({
|
|
93
|
+
filter: {
|
|
94
|
+
sessionId
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
if (!userId) {
|
|
98
|
+
return conversation;
|
|
99
|
+
}
|
|
100
|
+
if (!conversation) {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
let ownershipCheck = await this.aiConversationsRepo.count({
|
|
104
|
+
filter: {
|
|
105
|
+
sessionId,
|
|
106
|
+
userId
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
if (ownershipCheck === 0) {
|
|
110
|
+
ownershipCheck = await this.plugin.db.getRepository("aiWorkflowTasks").count({
|
|
111
|
+
filter: {
|
|
112
|
+
sessionId,
|
|
113
|
+
"users.id": userId
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
if (ownershipCheck) {
|
|
118
|
+
return conversation;
|
|
119
|
+
} else {
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
83
123
|
async getMessages({
|
|
84
124
|
userId,
|
|
85
125
|
sessionId,
|
|
86
126
|
cursor,
|
|
87
127
|
paginate = true
|
|
88
128
|
}) {
|
|
89
|
-
const conversation = await this.
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
userId
|
|
93
|
-
}
|
|
129
|
+
const conversation = await this.getConversation({
|
|
130
|
+
sessionId,
|
|
131
|
+
userId
|
|
94
132
|
});
|
|
95
133
|
if (!conversation) {
|
|
96
134
|
throw new Error("invalid sessionId");
|
|
@@ -226,7 +264,7 @@ class AIConversationsManager {
|
|
|
226
264
|
order: [["interruptActionOrder", "ASC"]]
|
|
227
265
|
});
|
|
228
266
|
if (!allInterruptedToolCall.every((t) => t.invokeStatus === "waiting")) {
|
|
229
|
-
return
|
|
267
|
+
return;
|
|
230
268
|
}
|
|
231
269
|
const message = await this.aiMessagesRepo.findOne({
|
|
232
270
|
filter: {
|
|
@@ -9,8 +9,6 @@
|
|
|
9
9
|
import { Model, Transaction } from '@nocobase/database';
|
|
10
10
|
import { LLMProvider } from '../llm-providers/provider';
|
|
11
11
|
import { AIChatContext, AIChatConversation, AIMessageInput, AIToolCall, UserDecision } from '../types';
|
|
12
|
-
import { DocumentSegmentedWithScore } from '../features';
|
|
13
|
-
import { KnowledgeBaseGroup } from '../types';
|
|
14
12
|
import { ToolsEntry } from '@nocobase/ai';
|
|
15
13
|
import { AIToolMessage } from '../types/ai-message.type';
|
|
16
14
|
import { Context } from '@nocobase/actions';
|
|
@@ -28,6 +26,9 @@ export interface AIEmployeeOptions {
|
|
|
28
26
|
model?: ModelRef;
|
|
29
27
|
legacy?: boolean;
|
|
30
28
|
from?: 'main-agent' | 'sub-agent';
|
|
29
|
+
tools?: {
|
|
30
|
+
name: string;
|
|
31
|
+
}[];
|
|
31
32
|
}
|
|
32
33
|
export declare class AIEmployee {
|
|
33
34
|
sessionId: string;
|
|
@@ -43,13 +44,16 @@ export declare class AIEmployee {
|
|
|
43
44
|
private webSearch?;
|
|
44
45
|
private model?;
|
|
45
46
|
private legacy?;
|
|
46
|
-
|
|
47
|
+
private tools;
|
|
48
|
+
private inWorkflow?;
|
|
49
|
+
constructor({ ctx, employee, sessionId, systemMessage, skillSettings, webSearch, model, legacy, from, tools, }: AIEmployeeOptions);
|
|
47
50
|
getFormatMessages(userMessages: AIMessageInput[]): Promise<{
|
|
48
51
|
role: "user" | "assistant" | "tool" | "system";
|
|
49
52
|
content: any;
|
|
50
53
|
tool_call_id?: string;
|
|
51
54
|
tool_calls?: AIToolCall[];
|
|
52
55
|
}[]>;
|
|
56
|
+
isInWorkflow(): Promise<boolean>;
|
|
53
57
|
private buildState;
|
|
54
58
|
private initSession;
|
|
55
59
|
private buildChatContext;
|
|
@@ -100,15 +104,9 @@ export declare class AIEmployee {
|
|
|
100
104
|
allowEmpty?: boolean;
|
|
101
105
|
responseMetadata: Map<string, any>;
|
|
102
106
|
}): Promise<void>;
|
|
107
|
+
private handleInterruptedToolCalls;
|
|
103
108
|
getEmployeeDataSourceContext(): string;
|
|
104
109
|
getSystemPrompt(userMessages: AIMessageInput[]): Promise<string>;
|
|
105
|
-
retrieveKnowledgeBase(userMessage: AIMessageInput): Promise<DocumentSegmentedWithScore[]>;
|
|
106
|
-
isEnabledKnowledgeBase(): boolean;
|
|
107
|
-
getAIEmployeeKnowledgeBaseConfig(): {
|
|
108
|
-
topK: number;
|
|
109
|
-
score: string;
|
|
110
|
-
};
|
|
111
|
-
getKnowledgeBaseGroup(): Promise<KnowledgeBaseGroup[]>;
|
|
112
110
|
initToolCall(transaction: Transaction, messageId: string, toolCalls: {
|
|
113
111
|
id: string;
|
|
114
112
|
name: string;
|