@metad/contracts 3.6.1 → 3.6.2
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/index.cjs.d.ts +1 -0
- package/index.cjs.js +4233 -5
- package/index.esm.d.ts +1 -0
- package/index.esm.js +4129 -0
- package/package.json +9 -2
- package/src/agent/{ai-model.ts → ai-model.d.ts} +2 -2
- package/src/agent/graph.d.ts +148 -0
- package/src/agent/index.d.ts +5 -0
- package/src/agent/token.d.ts +21 -0
- package/src/agent/utils.d.ts +19 -0
- package/src/agent/variables.d.ts +14 -0
- package/src/ai/ai-model.model.d.ts +198 -0
- package/src/ai/ai-provider.model.d.ts +43 -0
- package/src/ai/ai.model.d.ts +82 -0
- package/src/ai/chat-message-feedback.model.d.ts +24 -0
- package/src/ai/chat-message.model.d.ts +222 -0
- package/src/ai/chat.model.d.ts +189 -0
- package/src/ai/copilot-checkpoint.model.d.ts +23 -0
- package/src/ai/copilot-example.model.d.ts +19 -0
- package/src/ai/copilot-model.model.d.ts +26 -0
- package/src/ai/copilot-organization.model.d.ts +17 -0
- package/src/ai/copilot-provider.model.d.ts +31 -0
- package/src/ai/copilot-role.model.d.ts +43 -0
- package/src/ai/copilot-store.model.d.ts +29 -0
- package/src/ai/copilot-user.model.d.ts +20 -0
- package/src/ai/copilot.model.d.ts +36 -0
- package/src/ai/{environment.model.ts → environment.model.d.ts} +10 -12
- package/src/ai/feature.model.d.ts +6 -0
- package/src/ai/index.d.ts +39 -0
- package/src/ai/knowledge-doc-chunk.model.d.ts +60 -0
- package/src/ai/knowledge-doc-page.model.d.ts +15 -0
- package/src/ai/knowledge-doc.model.d.ts +192 -0
- package/src/ai/knowledge-pipeline.d.ts +107 -0
- package/src/ai/knowledge-retrieval-log.model.d.ts +10 -0
- package/src/ai/knowledgebase-task.model.d.ts +39 -0
- package/src/ai/knowledgebase.model.d.ts +162 -0
- package/src/ai/rag-web.d.ts +26 -0
- package/src/ai/rag.d.ts +24 -0
- package/src/ai/role-permissions.d.ts +13 -0
- package/src/ai/types.d.ts +39 -0
- package/src/ai/xpert-agent-execution.model.d.ts +96 -0
- package/src/ai/xpert-agent.model.d.ts +192 -0
- package/src/ai/xpert-project.model.d.ts +86 -0
- package/src/ai/xpert-task.model.d.ts +26 -0
- package/src/ai/xpert-template.model.d.ts +47 -0
- package/src/ai/xpert-tool-mcp.model.d.ts +67 -0
- package/src/ai/xpert-tool.model.d.ts +147 -0
- package/src/ai/xpert-toolset.model.d.ts +200 -0
- package/src/ai/xpert-workflow-task.prompt.d.ts +2 -0
- package/src/ai/xpert-workflow.model.d.ts +366 -0
- package/src/ai/xpert-workspace.model.d.ts +32 -0
- package/src/ai/xpert.model.d.ts +529 -0
- package/src/ai/xpert.utils.d.ts +80 -0
- package/src/analytics/ai.d.ts +73 -0
- package/src/analytics/approval-policy.model.d.ts +30 -0
- package/src/analytics/business-area-user.model.d.ts +35 -0
- package/src/analytics/business-area.d.ts +17 -0
- package/src/analytics/certification.model.d.ts +11 -0
- package/src/analytics/chatbi-conversation.model.d.ts +15 -0
- package/src/analytics/chatbi-model.model.d.ts +18 -0
- package/src/analytics/collection.model.d.ts +6 -0
- package/src/analytics/comment.model.d.ts +10 -0
- package/src/analytics/data-source-type.d.ts +16 -0
- package/src/analytics/data-source.d.ts +62 -0
- package/src/analytics/favorite.d.ts +14 -0
- package/src/analytics/features.d.ts +19 -0
- package/src/analytics/feed-model.d.ts +13 -0
- package/src/analytics/gateway.d.ts +27 -0
- package/src/analytics/index.d.ts +38 -0
- package/src/analytics/indicator-app.d.ts +44 -0
- package/src/analytics/{indicator-market.ts → indicator-market.d.ts} +2 -6
- package/src/analytics/indicator.d.ts +106 -0
- package/src/analytics/model-query-log.model.d.ts +41 -0
- package/src/analytics/model-query.d.ts +21 -0
- package/src/analytics/{notification-destination.ts → notification-destination.d.ts} +5 -9
- package/src/analytics/{permission-approval-user.model.ts → permission-approval-user.model.d.ts} +8 -10
- package/src/analytics/permission-approval.model.d.ts +47 -0
- package/src/analytics/project.model.d.ts +50 -0
- package/src/analytics/role-permissions.d.ts +25 -0
- package/src/analytics/schema.d.ts +262 -0
- package/src/analytics/screenshot.model.d.ts +25 -0
- package/src/analytics/semantic-model-entity.d.ts +37 -0
- package/src/analytics/semantic-model-member.d.ts +24 -0
- package/src/analytics/semantic-model.d.ts +175 -0
- package/src/analytics/{story-point.ts → story-point.d.ts} +6 -11
- package/src/analytics/story-template.model.d.ts +28 -0
- package/src/analytics/story-widget.d.ts +12 -0
- package/src/analytics/story.d.ts +93 -0
- package/src/analytics/subscription.d.ts +38 -0
- package/src/analytics/visit.model.d.ts +34 -0
- package/src/analytics/webSocket.d.ts +48 -0
- package/src/api-key.model.d.ts +10 -0
- package/src/base-entity.model.d.ts +27 -0
- package/src/contact.model.d.ts +41 -0
- package/src/core.model.d.ts +97 -0
- package/src/{country.model.ts → country.model.d.ts} +2 -3
- package/src/currency.model.d.ts +579 -0
- package/src/{custom-smtp.model.ts → custom-smtp.model.d.ts} +17 -21
- package/src/date-picker.model.d.ts +5 -0
- package/src/email-template.model.d.ts +39 -0
- package/src/email.model.d.ts +36 -0
- package/src/employee.model.d.ts +128 -0
- package/src/entity-with-members.model.d.ts +13 -0
- package/src/feature.model.d.ts +93 -0
- package/src/file-provider.d.ts +33 -0
- package/src/help-center-article.model.d.ts +0 -0
- package/src/help-center.model.d.ts +0 -0
- package/src/http-status.enum.d.ts +57 -0
- package/src/import-export.model.d.ts +36 -0
- package/src/index.d.ts +48 -0
- package/src/integration/dify.d.ts +0 -0
- package/src/integration/dingtalk.d.ts +2 -0
- package/src/integration/fastgpt.d.ts +0 -0
- package/src/integration/firecrawl.d.ts +2 -0
- package/src/integration/github.d.ts +69 -0
- package/src/integration/index.d.ts +4 -0
- package/src/integration/lark.d.ts +11 -0
- package/src/integration/wecom.d.ts +2 -0
- package/src/integration.model.d.ts +90 -0
- package/src/invite.model.d.ts +123 -0
- package/src/language.model.d.ts +19 -0
- package/src/organization-contact.model.d.ts +73 -0
- package/src/{organization-department.model.ts → organization-department.model.d.ts} +10 -16
- package/src/organization-language.model.d.ts +18 -0
- package/src/organization-projects.model.d.ts +80 -0
- package/src/organization-team-employee-model.d.ts +12 -0
- package/src/organization-team-model.d.ts +19 -0
- package/src/organization.model.d.ts +239 -0
- package/src/{password-reset.model.ts → password-reset.model.d.ts} +10 -14
- package/src/{plain-object.model.ts → plain-object.model.d.ts} +1 -1
- package/src/plugin.d.ts +13 -0
- package/src/role-permission.model.d.ts +61 -0
- package/src/role.model.d.ts +26 -0
- package/src/schedule.d.ts +27 -0
- package/src/secret-token.model.d.ts +11 -0
- package/src/seed.model.d.ts +37 -0
- package/src/storage-file.model.d.ts +40 -0
- package/src/tag-entity.model.d.ts +20 -0
- package/src/tenant.model.d.ts +40 -0
- package/src/tools/index.d.ts +1 -0
- package/src/tools/sandbox.d.ts +5 -0
- package/src/translation.model.d.ts +26 -0
- package/src/types.d.ts +241 -0
- package/src/user-organization.model.d.ts +24 -0
- package/src/user.model.d.ts +131 -0
- package/src/visibility.model.d.ts +6 -0
- package/.babelrc +0 -5
- package/.eslintrc.json +0 -18
- package/babel.config.json +0 -1
- package/jest.config.ts +0 -16
- package/project.json +0 -53
- package/src/agent/graph.ts +0 -272
- package/src/agent/index.ts +0 -5
- package/src/agent/token.ts +0 -23
- package/src/agent/utils.spec.ts +0 -283
- package/src/agent/utils.ts +0 -122
- package/src/agent/variables.ts +0 -21
- package/src/ai/ai-model.model.ts +0 -228
- package/src/ai/ai-provider.model.ts +0 -53
- package/src/ai/ai.model.ts +0 -87
- package/src/ai/chat-message-feedback.model.ts +0 -31
- package/src/ai/chat-message.model.ts +0 -277
- package/src/ai/chat.model.ts +0 -207
- package/src/ai/copilot-checkpoint.model.ts +0 -25
- package/src/ai/copilot-example.model.ts +0 -23
- package/src/ai/copilot-model.model.ts +0 -31
- package/src/ai/copilot-organization.model.ts +0 -21
- package/src/ai/copilot-provider.model.ts +0 -46
- package/src/ai/copilot-role.model.ts +0 -48
- package/src/ai/copilot-store.model.ts +0 -34
- package/src/ai/copilot-user.model.ts +0 -24
- package/src/ai/copilot.model.ts +0 -47
- package/src/ai/feature.model.ts +0 -6
- package/src/ai/index.ts +0 -39
- package/src/ai/knowledge-doc-chunk.model.ts +0 -120
- package/src/ai/knowledge-doc-chunk.spec.ts +0 -47
- package/src/ai/knowledge-doc-page.model.ts +0 -20
- package/src/ai/knowledge-doc.model.ts +0 -252
- package/src/ai/knowledge-pipeline.ts +0 -138
- package/src/ai/knowledge-retrieval-log.model.ts +0 -19
- package/src/ai/knowledgebase-task.model.ts +0 -46
- package/src/ai/knowledgebase.model.ts +0 -190
- package/src/ai/rag-web.ts +0 -54
- package/src/ai/rag.ts +0 -24
- package/src/ai/role-permissions.ts +0 -13
- package/src/ai/types.ts +0 -83
- package/src/ai/xpert-agent-execution.model.ts +0 -115
- package/src/ai/xpert-agent.model.ts +0 -258
- package/src/ai/xpert-project.model.ts +0 -103
- package/src/ai/xpert-task.model.ts +0 -32
- package/src/ai/xpert-template.model.ts +0 -53
- package/src/ai/xpert-tool-mcp.model.ts +0 -72
- package/src/ai/xpert-tool.model.ts +0 -211
- package/src/ai/xpert-toolset.model.ts +0 -220
- package/src/ai/xpert-workflow-task.prompt.ts +0 -71
- package/src/ai/xpert-workflow.model.ts +0 -449
- package/src/ai/xpert-workspace.model.ts +0 -42
- package/src/ai/xpert.model.ts +0 -613
- package/src/ai/xpert.utils.ts +0 -214
- package/src/analytics/ai.ts +0 -79
- package/src/analytics/approval-policy.model.ts +0 -40
- package/src/analytics/business-area-user.model.ts +0 -43
- package/src/analytics/business-area.ts +0 -20
- package/src/analytics/certification.model.ts +0 -12
- package/src/analytics/chatbi-conversation.model.ts +0 -16
- package/src/analytics/chatbi-model.model.ts +0 -22
- package/src/analytics/collection.model.ts +0 -8
- package/src/analytics/comment.model.ts +0 -14
- package/src/analytics/data-source-type.ts +0 -19
- package/src/analytics/data-source.ts +0 -72
- package/src/analytics/favorite.ts +0 -18
- package/src/analytics/features.ts +0 -19
- package/src/analytics/feed-model.ts +0 -15
- package/src/analytics/gateway.ts +0 -30
- package/src/analytics/index.ts +0 -39
- package/src/analytics/indicator-app.ts +0 -49
- package/src/analytics/indicator.ts +0 -127
- package/src/analytics/model-query-log.model.ts +0 -45
- package/src/analytics/model-query.ts +0 -22
- package/src/analytics/permission-approval.model.ts +0 -58
- package/src/analytics/project.model.ts +0 -56
- package/src/analytics/role-permissions.ts +0 -36
- package/src/analytics/schema.ts +0 -300
- package/src/analytics/screenshot.model.ts +0 -28
- package/src/analytics/semantic-model-entity.ts +0 -49
- package/src/analytics/semantic-model-member.ts +0 -45
- package/src/analytics/semantic-model.ts +0 -227
- package/src/analytics/story-template.model.ts +0 -34
- package/src/analytics/story-widget.ts +0 -15
- package/src/analytics/story.ts +0 -109
- package/src/analytics/subscription.ts +0 -43
- package/src/analytics/visit.model.ts +0 -39
- package/src/analytics/webSocket.ts +0 -53
- package/src/api-key.model.ts +0 -11
- package/src/base-entity.model.ts +0 -34
- package/src/contact.model.ts +0 -45
- package/src/core.model.ts +0 -103
- package/src/currency.model.ts +0 -582
- package/src/date-picker.model.ts +0 -5
- package/src/email-template.model.ts +0 -50
- package/src/email.model.ts +0 -46
- package/src/employee.model.ts +0 -199
- package/src/entity-with-members.model.ts +0 -16
- package/src/feature.model.ts +0 -108
- package/src/file-provider.ts +0 -37
- package/src/help-center-article.model.ts +0 -35
- package/src/help-center.model.ts +0 -33
- package/src/http-status.enum.ts +0 -58
- package/src/import-export.model.ts +0 -42
- package/src/index.ts +0 -60
- package/src/integration/dify.ts +0 -31
- package/src/integration/dingtalk.ts +0 -16
- package/src/integration/fastgpt.ts +0 -32
- package/src/integration/firecrawl.ts +0 -46
- package/src/integration/github.ts +0 -149
- package/src/integration/index.ts +0 -15
- package/src/integration/lark.ts +0 -79
- package/src/integration/wecom.ts +0 -16
- package/src/integration.model.ts +0 -119
- package/src/invite.model.ts +0 -144
- package/src/language.model.ts +0 -22
- package/src/organization-contact.model.ts +0 -84
- package/src/organization-language.model.ts +0 -24
- package/src/organization-projects.model.ts +0 -99
- package/src/organization-team-employee-model.ts +0 -14
- package/src/organization-team-model.ts +0 -25
- package/src/organization.model.ts +0 -266
- package/src/plugin.ts +0 -15
- package/src/role-permission.model.ts +0 -123
- package/src/role.model.ts +0 -31
- package/src/schedule.ts +0 -71
- package/src/secret-token.model.ts +0 -15
- package/src/seed.model.ts +0 -50
- package/src/storage-file.model.ts +0 -46
- package/src/tag-entity.model.ts +0 -23
- package/src/tenant.model.ts +0 -52
- package/src/tools/index.ts +0 -1
- package/src/tools/sandbox.ts +0 -5
- package/src/translation.model.ts +0 -37
- package/src/types.ts +0 -277
- package/src/user-organization.model.ts +0 -31
- package/src/user.model.ts +0 -151
- package/src/visibility.model.ts +0 -6
- package/tsconfig.json +0 -22
- package/tsconfig.lib.json +0 -10
- package/tsconfig.spec.json +0 -9
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { I18nObject, IconDefinition, letterStartSUID } from '../types'
|
|
2
|
-
import { ICopilotModel } from './copilot-model.model'
|
|
3
|
-
import { KnowledgeStructureEnum } from './knowledgebase.model'
|
|
4
|
-
import { IWorkflowNode, WorkflowNodeTypeEnum } from './xpert-workflow.model'
|
|
5
|
-
import { TXpertParameter } from './xpert.model'
|
|
6
|
-
|
|
7
|
-
export interface IDocumentNodeProvider {
|
|
8
|
-
name: string
|
|
9
|
-
label: I18nObject
|
|
10
|
-
icon?: IconDefinition
|
|
11
|
-
description?: I18nObject
|
|
12
|
-
helpUrl?: string
|
|
13
|
-
configSchema: any;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Category of document source provider
|
|
18
|
-
*/
|
|
19
|
-
export enum DocumentSourceProviderCategoryEnum {
|
|
20
|
-
/**
|
|
21
|
-
* Local files uploaded directly to the system
|
|
22
|
-
*/
|
|
23
|
-
LocalFile = 'local-file',
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Remote file systems, e.g. S3, FTP, etc.
|
|
27
|
-
*/
|
|
28
|
-
FileSystem = 'file-system',
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Online documents, e.g. public URLs, Google Docs, etc.
|
|
32
|
-
*/
|
|
33
|
-
OnlineDocument = 'online-document',
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Web crawling from public websites
|
|
37
|
-
*/
|
|
38
|
-
WebCrawl = 'web-crawl',
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Database connections, e.g. MySQL, PostgreSQL, etc.
|
|
42
|
-
* @deprecated Planning
|
|
43
|
-
*/
|
|
44
|
-
Database = 'database'
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export interface IDocumentSourceProvider extends IDocumentNodeProvider {
|
|
48
|
-
category: DocumentSourceProviderCategoryEnum
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
52
|
-
export interface IDocumentProcessorProvider extends IDocumentNodeProvider {}
|
|
53
|
-
|
|
54
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
55
|
-
export interface IDocumentChunkerProvider extends IDocumentNodeProvider {}
|
|
56
|
-
|
|
57
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
58
|
-
export interface IDocumentUnderstandingProvider extends IDocumentNodeProvider {
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Knowledge Pipeline Source Node
|
|
65
|
-
*/
|
|
66
|
-
export interface IWFNSource<T = any> extends IWorkflowNode {
|
|
67
|
-
type: WorkflowNodeTypeEnum.SOURCE,
|
|
68
|
-
provider: string
|
|
69
|
-
parameters?: TXpertParameter[];
|
|
70
|
-
config: T;
|
|
71
|
-
integrationId?: string
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export interface IWFNProcessor extends IWorkflowNode {
|
|
75
|
-
type: WorkflowNodeTypeEnum.PROCESSOR,
|
|
76
|
-
provider: string
|
|
77
|
-
config: any;
|
|
78
|
-
input: string
|
|
79
|
-
integrationId?: string
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export interface IWFNChunker extends IWorkflowNode {
|
|
83
|
-
type: WorkflowNodeTypeEnum.CHUNKER,
|
|
84
|
-
provider: string
|
|
85
|
-
config: any;
|
|
86
|
-
input: string
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export interface IWFNUnderstanding extends IWorkflowNode {
|
|
90
|
-
type: WorkflowNodeTypeEnum.UNDERSTANDING,
|
|
91
|
-
provider: string
|
|
92
|
-
config: any;
|
|
93
|
-
input: string
|
|
94
|
-
visionModel?: ICopilotModel
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export interface IWFNKnowledgeBase extends IWorkflowNode {
|
|
98
|
-
type: WorkflowNodeTypeEnum.KNOWLEDGE_BASE,
|
|
99
|
-
/**
|
|
100
|
-
* @deprecated
|
|
101
|
-
*/
|
|
102
|
-
structure?: KnowledgeStructureEnum
|
|
103
|
-
/**
|
|
104
|
-
* Documents input variables
|
|
105
|
-
*/
|
|
106
|
-
inputs?: string[]
|
|
107
|
-
/**
|
|
108
|
-
* Embedding model
|
|
109
|
-
*/
|
|
110
|
-
copilotModel?: ICopilotModel
|
|
111
|
-
/**
|
|
112
|
-
* (optional) Rerank model
|
|
113
|
-
*/
|
|
114
|
-
rerankModel?: ICopilotModel
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* (optional) Vision model
|
|
118
|
-
*/
|
|
119
|
-
visionModel?: ICopilotModel
|
|
120
|
-
|
|
121
|
-
documents?: string[]
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export function genPipelineSourceKey() {
|
|
125
|
-
return letterStartSUID('Source_')
|
|
126
|
-
}
|
|
127
|
-
export function genPipelineProcessorKey() {
|
|
128
|
-
return letterStartSUID('Processor_')
|
|
129
|
-
}
|
|
130
|
-
export function genPipelineChunkerKey() {
|
|
131
|
-
return letterStartSUID('Chunker_')
|
|
132
|
-
}
|
|
133
|
-
export function genPipelineUnderstandingKey() {
|
|
134
|
-
return letterStartSUID('Understanding_')
|
|
135
|
-
}
|
|
136
|
-
export function genPipelineKnowledgeBaseKey() {
|
|
137
|
-
return letterStartSUID('KnowledgeBase_')
|
|
138
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { IBasePerTenantAndOrganizationEntityModel } from "../base-entity.model"
|
|
2
|
-
import { IKnowledgebase } from "./knowledgebase.model"
|
|
3
|
-
|
|
4
|
-
export interface IKnowledgeRetrievalLog extends IBasePerTenantAndOrganizationEntityModel {
|
|
5
|
-
// 检索触发的查询内容
|
|
6
|
-
query: string
|
|
7
|
-
// 检索来源,比如:ChatBI、ChatDB、API
|
|
8
|
-
source: string;
|
|
9
|
-
|
|
10
|
-
// 命中分段数
|
|
11
|
-
hitCount: number;
|
|
12
|
-
|
|
13
|
-
// 请求 ID(用于一次对话追踪)
|
|
14
|
-
requestId: string;
|
|
15
|
-
|
|
16
|
-
knowledgebaseId?: string
|
|
17
|
-
// 与知识库关联
|
|
18
|
-
knowledgebase?: IKnowledgebase
|
|
19
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model'
|
|
2
|
-
import { IChatConversation } from './chat.model';
|
|
3
|
-
import { IKnowledgeDocument } from './knowledge-doc.model';
|
|
4
|
-
import { IKnowledgebase } from './knowledgebase.model'
|
|
5
|
-
import { IXpertAgentExecution } from './xpert-agent-execution.model';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Task executions of a knowledgebase
|
|
9
|
-
*/
|
|
10
|
-
export interface IKnowledgebaseTask extends IBasePerTenantAndOrganizationEntityModel {
|
|
11
|
-
knowledgebaseId?: string
|
|
12
|
-
knowledgebase?: IKnowledgebase
|
|
13
|
-
|
|
14
|
-
conversationId?: string;
|
|
15
|
-
conversation?: IChatConversation
|
|
16
|
-
|
|
17
|
-
executionId?: string;
|
|
18
|
-
execution?: IXpertAgentExecution;
|
|
19
|
-
|
|
20
|
-
taskType: string; // preprocess / re-embed / cleanup ...
|
|
21
|
-
status?: 'pending' | 'running' | 'success' | 'failed' | 'cancelled';
|
|
22
|
-
steps: TaskStep[];
|
|
23
|
-
error?: string;
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Temporary content: Documents not actually processed in the task yet
|
|
27
|
-
*/
|
|
28
|
-
context?: {
|
|
29
|
-
documents?: Partial<IKnowledgeDocument>[]
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Many to Many of documents in task
|
|
34
|
-
*/
|
|
35
|
-
documents?: IKnowledgeDocument[]
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface TaskStep {
|
|
39
|
-
name: string; // step name: load, preprocess, split, embed, store
|
|
40
|
-
status: 'pending' | 'running' | 'success' | 'failed';
|
|
41
|
-
progress: number; // 0 - 100
|
|
42
|
-
log?: string; // optional logs
|
|
43
|
-
error_message?: string; // optional error
|
|
44
|
-
started_at?: Date;
|
|
45
|
-
finished_at?: Date;
|
|
46
|
-
}
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import { ICopilotModel } from './copilot-model.model'
|
|
2
|
-
import { TAvatar } from '../types'
|
|
3
|
-
import { IBasePerWorkspaceEntityModel } from './xpert-workspace.model'
|
|
4
|
-
import { IKnowledgeDocument } from './knowledge-doc.model'
|
|
5
|
-
import { IXpert } from './xpert.model'
|
|
6
|
-
import { IIntegration } from '../integration.model'
|
|
7
|
-
import { channelName } from '../agent/graph'
|
|
8
|
-
import { IDocChunkMetadata } from './knowledge-doc-chunk.model'
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Non-internal types should remain the same as IntegrationEnum.
|
|
12
|
-
*/
|
|
13
|
-
export enum KnowledgeProviderEnum {
|
|
14
|
-
Internal = 'internal',
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export enum KnowledgebaseTypeEnum {
|
|
18
|
-
Standard = 'standard',
|
|
19
|
-
External = 'external'
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export enum KnowledgeStructureEnum {
|
|
23
|
-
General = 'general',
|
|
24
|
-
ParentChild = 'parent-child',
|
|
25
|
-
QA = 'qa'
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export type KnowledgebaseParserConfig = {
|
|
29
|
-
pages?: number[][]
|
|
30
|
-
embeddingBatchSize?: number
|
|
31
|
-
chunkSize: number | null
|
|
32
|
-
chunkOverlap: number | null
|
|
33
|
-
delimiter: string | null
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Type of rag knowledgebase
|
|
38
|
-
*/
|
|
39
|
-
export type TKnowledgebase = {
|
|
40
|
-
/**
|
|
41
|
-
* KB name
|
|
42
|
-
*/
|
|
43
|
-
name: string
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Type of KB
|
|
47
|
-
*/
|
|
48
|
-
type: KnowledgebaseTypeEnum
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* English | Chinese
|
|
52
|
-
*/
|
|
53
|
-
language?: 'Chinese' | 'English' | null
|
|
54
|
-
/**
|
|
55
|
-
* Avatar object
|
|
56
|
-
*/
|
|
57
|
-
avatar?: TAvatar
|
|
58
|
-
/**
|
|
59
|
-
* KB description
|
|
60
|
-
*/
|
|
61
|
-
description?: string
|
|
62
|
-
/**
|
|
63
|
-
* Public in tenant or in organization or private
|
|
64
|
-
* @default private
|
|
65
|
-
*/
|
|
66
|
-
permission?: KnowledgebasePermission
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Copilot model for knowledgebase
|
|
70
|
-
*/
|
|
71
|
-
copilotModel?: ICopilotModel
|
|
72
|
-
copilotModelId?: string
|
|
73
|
-
|
|
74
|
-
// Rerank model for re-ranking retrieved chunks
|
|
75
|
-
rerankModel?: ICopilotModel
|
|
76
|
-
rerankModelId?: string
|
|
77
|
-
|
|
78
|
-
// Vision model for image understanding
|
|
79
|
-
visionModel?: ICopilotModel
|
|
80
|
-
visionModelId?: string
|
|
81
|
-
|
|
82
|
-
documentNum?: number | null
|
|
83
|
-
tokenNum?: number | null
|
|
84
|
-
chunkNum?: number | null
|
|
85
|
-
/**
|
|
86
|
-
*@deprecated use `recall`
|
|
87
|
-
*/
|
|
88
|
-
similarityThreshold?: number
|
|
89
|
-
vectorSimilarityWeight?: number
|
|
90
|
-
/**
|
|
91
|
-
* @deprecated
|
|
92
|
-
* default parser ID
|
|
93
|
-
*/
|
|
94
|
-
parserId?: string
|
|
95
|
-
|
|
96
|
-
parserConfig?: KnowledgebaseParserConfig
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Index structure determines how the knowledge base organizes and indexes your document content.
|
|
100
|
-
* @deprecated
|
|
101
|
-
*/
|
|
102
|
-
structure?: KnowledgeStructureEnum
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Recall params for kb chunks
|
|
106
|
-
*/
|
|
107
|
-
recall?: TKBRecallParams
|
|
108
|
-
|
|
109
|
-
status?: string
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* API service enabled
|
|
113
|
-
*/
|
|
114
|
-
apiEnabled?: boolean
|
|
115
|
-
|
|
116
|
-
documents?: IKnowledgeDocument[]
|
|
117
|
-
|
|
118
|
-
integrationId?: string
|
|
119
|
-
extKnowledgebaseId?: string
|
|
120
|
-
pipelineId?: string
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Knowledgebase Entity
|
|
125
|
-
*/
|
|
126
|
-
export interface IKnowledgebase extends TKnowledgebase, IBasePerWorkspaceEntityModel {
|
|
127
|
-
xperts?: IXpert[]
|
|
128
|
-
integration?: IIntegration
|
|
129
|
-
pipeline?: IXpert
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Knowledgebase permission levels
|
|
134
|
-
*/
|
|
135
|
-
export enum KnowledgebasePermission {
|
|
136
|
-
/**
|
|
137
|
-
* Only visible to you
|
|
138
|
-
* @default
|
|
139
|
-
*/
|
|
140
|
-
Private = 'private',
|
|
141
|
-
/**
|
|
142
|
-
* Visible to all members in the organization
|
|
143
|
-
*/
|
|
144
|
-
Organization = 'organization',
|
|
145
|
-
/**
|
|
146
|
-
* Visible to all members in the tenant
|
|
147
|
-
*/
|
|
148
|
-
Public = 'public'
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Recall parameters
|
|
153
|
-
*/
|
|
154
|
-
export type TKBRecallParams = {
|
|
155
|
-
/**
|
|
156
|
-
* Top K of result chunks
|
|
157
|
-
*/
|
|
158
|
-
topK?: number
|
|
159
|
-
/**
|
|
160
|
-
* At least the similarity threshold
|
|
161
|
-
*/
|
|
162
|
-
score?: number
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* Weight in EnsembleRetriever
|
|
166
|
-
*/
|
|
167
|
-
weight?: number
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
export type DocumentMetadata = IDocChunkMetadata & {
|
|
171
|
-
score?: number;
|
|
172
|
-
relevanceScore?: number
|
|
173
|
-
} & Record<string, any>;
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* Channel name for knowledgebase pipeline
|
|
178
|
-
*/
|
|
179
|
-
export const KnowledgebaseChannel = channelName('knowledgebase')
|
|
180
|
-
/**
|
|
181
|
-
* Task ID of a knowledgebase run
|
|
182
|
-
*/
|
|
183
|
-
export const KnowledgeTask = 'task_id'
|
|
184
|
-
/**
|
|
185
|
-
* Specify the data source to run
|
|
186
|
-
*/
|
|
187
|
-
export const KNOWLEDGE_SOURCES_NAME = 'sources'
|
|
188
|
-
export const KNOWLEDGE_DOCUMENTS_NAME = 'documents'
|
|
189
|
-
export const KNOWLEDGE_FOLDER_ID_NAME = 'folder_id'
|
|
190
|
-
export const KNOWLEDGE_STAGE_NAME = 'stage'
|
package/src/ai/rag-web.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { IntegrationEnum } from "../integration.model";
|
|
2
|
-
import { TParameter, TSelectOption } from "../types";
|
|
3
|
-
import { IKnowledgeDocumentPage } from "./knowledge-doc-page.model";
|
|
4
|
-
|
|
5
|
-
export enum KDocumentWebTypeEnum {
|
|
6
|
-
Playwright = 'playwright',
|
|
7
|
-
FireCrawl = 'firecrawl',
|
|
8
|
-
Notion = 'notion'
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export type TRagWebOptions = {
|
|
12
|
-
url: string
|
|
13
|
-
params?: Record<string, unknown>
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export type TKDocumentWebSchema = {
|
|
17
|
-
type: KDocumentWebTypeEnum,
|
|
18
|
-
helpUrl: string,
|
|
19
|
-
options: TParameter[]
|
|
20
|
-
/**
|
|
21
|
-
* Need to provide integration of provider
|
|
22
|
-
*/
|
|
23
|
-
integrationProvider?: IntegrationEnum
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export type TRagWebResult = {
|
|
27
|
-
docs: IKnowledgeDocumentPage[]
|
|
28
|
-
duration: number
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export const KDocumentWebTypeOptions: TSelectOption<KDocumentWebTypeEnum>[] = [
|
|
32
|
-
{
|
|
33
|
-
value: KDocumentWebTypeEnum.Playwright,
|
|
34
|
-
label: {
|
|
35
|
-
en_US: 'Playwright'
|
|
36
|
-
},
|
|
37
|
-
icon: `<svg width="100%" height="100%" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
38
|
-
<path d="M136.444 221.556C123.558 225.213 115.104 231.625 109.535 238.032C114.869 233.364 122.014 229.08 131.652 226.348C141.51 223.554 149.92 223.574 156.869 224.915V219.481C150.941 218.939 144.145 219.371 136.444 221.556ZM108.946 175.876L61.0895 188.484C61.0895 188.484 61.9617 189.716 63.5767 191.36L104.153 180.668C104.153 180.668 103.578 188.077 98.5847 194.705C108.03 187.559 108.946 175.876 108.946 175.876ZM149.005 288.347C81.6582 306.486 46.0272 228.438 35.2396 187.928C30.2556 169.229 28.0799 155.067 27.5 145.928C27.4377 144.979 27.4665 144.179 27.5336 143.446C24.04 143.657 22.3674 145.473 22.7077 150.721C23.2876 159.855 25.4633 174.016 30.4473 192.721C41.2301 233.225 76.8659 311.273 144.213 293.134C158.872 289.185 169.885 281.992 178.152 272.81C170.532 279.692 160.995 285.112 149.005 288.347ZM161.661 128.11V132.903H188.077C187.535 131.206 186.989 129.677 186.447 128.11H161.661Z" fill="#2D4552"/>
|
|
39
|
-
<path d="M193.981 167.584C205.861 170.958 212.144 179.287 215.465 186.658L228.711 190.42C228.711 190.42 226.904 164.623 203.57 157.995C181.741 151.793 168.308 170.124 166.674 172.496C173.024 167.972 182.297 164.268 193.981 167.584ZM299.422 186.777C277.573 180.547 264.145 198.916 262.535 201.255C268.89 196.736 278.158 193.031 289.837 196.362C301.698 199.741 307.976 208.06 311.307 215.436L324.572 219.212C324.572 219.212 322.736 193.41 299.422 186.777ZM286.262 254.795L176.072 223.99C176.072 223.99 177.265 230.038 181.842 237.869L274.617 263.805C282.255 259.386 286.262 254.795 286.262 254.795ZM209.867 321.102C122.618 297.71 133.166 186.543 147.284 133.865C153.097 112.156 159.073 96.0203 164.029 85.204C161.072 84.5953 158.623 86.1529 156.203 91.0746C150.941 101.747 144.212 119.124 137.7 143.45C123.586 196.127 113.038 307.29 200.283 330.682C241.406 341.699 273.442 324.955 297.323 298.659C274.655 319.19 245.714 330.701 209.867 321.102Z" fill="#2D4552"/>
|
|
40
|
-
<path d="M161.661 262.296V239.863L99.3324 257.537C99.3324 257.537 103.938 230.777 136.444 221.556C146.302 218.762 154.713 218.781 161.661 220.123V128.11H192.869C189.471 117.61 186.184 109.526 183.423 103.909C178.856 94.612 174.174 100.775 163.545 109.665C156.059 115.919 137.139 129.261 108.668 136.933C80.1966 144.61 57.179 142.574 47.5752 140.911C33.9601 138.562 26.8387 135.572 27.5049 145.928C28.0847 155.062 30.2605 169.224 35.2445 187.928C46.0272 228.433 81.663 306.481 149.01 288.342C166.602 283.602 179.019 274.233 187.626 262.291H161.661V262.296ZM61.0848 188.484L108.946 175.876C108.946 175.876 107.551 194.288 89.6087 199.018C71.6614 203.743 61.0848 188.484 61.0848 188.484Z" fill="#E2574C"/>
|
|
41
|
-
<path d="M341.786 129.174C329.345 131.355 299.498 134.072 262.612 124.185C225.716 114.304 201.236 97.0224 191.537 88.8994C177.788 77.3834 171.74 69.3802 165.788 81.4857C160.526 92.163 153.797 109.54 147.284 133.866C133.171 186.543 122.623 297.706 209.867 321.098C297.093 344.47 343.53 242.92 357.644 190.238C364.157 165.917 367.013 147.5 367.799 135.625C368.695 122.173 359.455 126.078 341.786 129.174ZM166.497 172.756C166.497 172.756 180.246 151.372 203.565 158C226.899 164.628 228.706 190.425 228.706 190.425L166.497 172.756ZM223.42 268.713C182.403 256.698 176.077 223.99 176.077 223.99L286.262 254.796C286.262 254.791 264.021 280.578 223.42 268.713ZM262.377 201.495C262.377 201.495 276.107 180.126 299.422 186.773C322.736 193.411 324.572 219.208 324.572 219.208L262.377 201.495Z" fill="#2EAD33"/>
|
|
42
|
-
<path d="M139.88 246.04L99.3324 257.532C99.3324 257.532 103.737 232.44 133.607 222.496L110.647 136.33L108.663 136.933C80.1918 144.611 57.1742 142.574 47.5704 140.911C33.9554 138.563 26.834 135.572 27.5001 145.929C28.08 155.063 30.2557 169.224 35.2397 187.929C46.0225 228.433 81.6583 306.481 149.005 288.342L150.989 287.719L139.88 246.04ZM61.0848 188.485L108.946 175.876C108.946 175.876 107.551 194.288 89.6087 199.018C71.6615 203.743 61.0848 188.485 61.0848 188.485Z" fill="#D65348"/>
|
|
43
|
-
<path d="M225.27 269.163L223.415 268.712C182.398 256.698 176.072 223.99 176.072 223.99L232.89 239.872L262.971 124.281L262.607 124.185C225.711 114.304 201.232 97.0224 191.532 88.8994C177.783 77.3834 171.735 69.3802 165.783 81.4857C160.526 92.163 153.797 109.54 147.284 133.866C133.171 186.543 122.623 297.706 209.867 321.097L211.655 321.5L225.27 269.163ZM166.497 172.756C166.497 172.756 180.246 151.372 203.565 158C226.899 164.628 228.706 190.425 228.706 190.425L166.497 172.756Z" fill="#1D8D22"/>
|
|
44
|
-
<path d="M141.946 245.451L131.072 248.537C133.641 263.019 138.169 276.917 145.276 289.195C146.513 288.922 147.74 288.687 149 288.342C152.302 287.451 155.364 286.348 158.312 285.145C150.371 273.361 145.118 259.789 141.946 245.451ZM137.7 143.451C132.112 164.307 127.113 194.326 128.489 224.436C130.952 223.367 133.554 222.371 136.444 221.551L138.457 221.101C136.003 188.939 141.308 156.165 147.284 133.866C148.799 128.225 150.318 122.978 151.832 118.085C149.393 119.637 146.767 121.228 143.776 122.867C141.759 129.093 139.722 135.898 137.7 143.451Z" fill="#C04B41"/>
|
|
45
|
-
</svg>`
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
value: KDocumentWebTypeEnum.FireCrawl,
|
|
49
|
-
label: {
|
|
50
|
-
en_US: 'FireCrawl'
|
|
51
|
-
},
|
|
52
|
-
icon: `🔥`,
|
|
53
|
-
}
|
|
54
|
-
]
|
package/src/ai/rag.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export enum VectorTypeEnum {
|
|
2
|
-
ANALYTICDB = 'analyticdb',
|
|
3
|
-
CHROMA = 'chroma',
|
|
4
|
-
MILVUS = 'milvus',
|
|
5
|
-
MYSCALE = 'myscale',
|
|
6
|
-
PGVECTOR = 'pgvector',
|
|
7
|
-
PGVECTO_RS = 'pgvecto-rs',
|
|
8
|
-
QDRANT = 'qdrant',
|
|
9
|
-
RELYT = 'relyt',
|
|
10
|
-
TIDB_VECTOR = 'tidb_vector',
|
|
11
|
-
WEAVIATE = 'weaviate',
|
|
12
|
-
OPENSEARCH = 'opensearch',
|
|
13
|
-
TENCENT = 'tencent',
|
|
14
|
-
ORACLE = 'oracle',
|
|
15
|
-
ELASTICSEARCH = 'elasticsearch',
|
|
16
|
-
ELASTICSEARCH_JA = 'elasticsearch-ja',
|
|
17
|
-
LINDORM = 'lindorm',
|
|
18
|
-
COUCHBASE = 'couchbase',
|
|
19
|
-
BAIDU = 'baidu',
|
|
20
|
-
VIKINGDB = 'vikingdb',
|
|
21
|
-
UPSTASH = 'upstash',
|
|
22
|
-
TIDB_ON_QDRANT = 'tidb_on_qdrant',
|
|
23
|
-
OCEANBASE = 'oceanbase'
|
|
24
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export enum AIPermissionsEnum {
|
|
2
|
-
/**
|
|
3
|
-
* Create or edit Knowledgebase in organization.
|
|
4
|
-
*/
|
|
5
|
-
KNOWLEDGEBASE_EDIT = 'KNOWLEDGEBASE_EDIT',
|
|
6
|
-
COPILOT_VIEW = 'COPILOT_VIEW',
|
|
7
|
-
COPILOT_EDIT = 'COPILOT_EDIT',
|
|
8
|
-
/**
|
|
9
|
-
* Create or edit Xperts in organization.
|
|
10
|
-
*/
|
|
11
|
-
XPERT_EDIT = 'XPERT_EDIT',
|
|
12
|
-
CHAT_VIEW = 'CHAT_VIEW',
|
|
13
|
-
}
|
package/src/ai/types.ts
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { TSelectOption } from "../types";
|
|
2
|
-
import { TXpertAttachmentType, XpertParameterTypeEnum } from "./xpert.model"
|
|
3
|
-
|
|
4
|
-
export type TErrorHandling = {
|
|
5
|
-
type?: null | 'defaultValue' | 'failBranch'
|
|
6
|
-
defaultValue?: {content?: string; } & Record<string, any>
|
|
7
|
-
failBranch?: string
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export enum ApiAuthType {
|
|
11
|
-
/**
|
|
12
|
-
* Enum class for api provider auth type.
|
|
13
|
-
*/
|
|
14
|
-
NONE = "none",
|
|
15
|
-
API_KEY = "api_key",
|
|
16
|
-
BASIC = 'basic'
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Reference variable (parameter)
|
|
21
|
-
*/
|
|
22
|
-
export type TXpertRefParameter = {
|
|
23
|
-
type?: XpertParameterTypeEnum
|
|
24
|
-
name: string
|
|
25
|
-
optional?: boolean
|
|
26
|
-
/**
|
|
27
|
-
* Referencing other variable
|
|
28
|
-
*/
|
|
29
|
-
variable?: string
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Embedding status of an entity, such as an bi indicator or kb document.
|
|
34
|
-
*/
|
|
35
|
-
export enum EmbeddingStatusEnum {
|
|
36
|
-
PROCESSING = 'processing',
|
|
37
|
-
SUCCESS = 'success',
|
|
38
|
-
FAILED = 'failed',
|
|
39
|
-
REQUIRED = 'required',
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export const Attachment_Type_Options: TSelectOption<string, TXpertAttachmentType>[] = [
|
|
43
|
-
{
|
|
44
|
-
key: 'document',
|
|
45
|
-
value: 'TXT, MD, MDX, MARKDOWN, PDF, HTML, XLSX, XLS, DOC, DOCX, CSV, EML, MSG, PPTX, PPT, XML, EPUB',
|
|
46
|
-
label: {
|
|
47
|
-
zh_Hans: '文档',
|
|
48
|
-
en_US: 'Document',
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
key: 'image',
|
|
53
|
-
value: 'JPG, JPEG, PNG, GIF, WEBP, SVG',
|
|
54
|
-
label: {
|
|
55
|
-
zh_Hans: '图片',
|
|
56
|
-
en_US: 'Image',
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
key: 'audio',
|
|
61
|
-
value: 'MP3, M4A, WAV, AMR, MPGA',
|
|
62
|
-
label: {
|
|
63
|
-
zh_Hans: '音频',
|
|
64
|
-
en_US: 'Audio',
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
key: 'video',
|
|
69
|
-
value: 'MP4, MOV, MPEG, WEBM',
|
|
70
|
-
label: {
|
|
71
|
-
zh_Hans: '视频',
|
|
72
|
-
en_US: 'Video',
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
key: 'others',
|
|
77
|
-
value: '',
|
|
78
|
-
label: {
|
|
79
|
-
zh_Hans: '其他文件类型',
|
|
80
|
-
en_US: 'Other file types',
|
|
81
|
-
},
|
|
82
|
-
}
|
|
83
|
-
]
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { StoredMessage } from '@langchain/core/messages'
|
|
2
|
-
import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model'
|
|
3
|
-
import { IXpert, TXpertTeamNodeType } from './xpert.model'
|
|
4
|
-
import { IXpertAgent } from './xpert-agent.model'
|
|
5
|
-
import { TSensitiveOperation } from './chat.model'
|
|
6
|
-
import { WorkflowNodeTypeEnum } from './xpert-workflow.model'
|
|
7
|
-
|
|
8
|
-
export type TXpertExecution = {
|
|
9
|
-
category?: TXpertTeamNodeType
|
|
10
|
-
type?: WorkflowNodeTypeEnum | string
|
|
11
|
-
title?: string
|
|
12
|
-
inputs?: any
|
|
13
|
-
outputs?: any
|
|
14
|
-
status?: XpertAgentExecutionStatusEnum
|
|
15
|
-
error?: string
|
|
16
|
-
elapsedTime?: number
|
|
17
|
-
|
|
18
|
-
// State of graph
|
|
19
|
-
threadId?: string
|
|
20
|
-
checkpointNs?: string
|
|
21
|
-
checkpointId?: string
|
|
22
|
-
channelName?: string
|
|
23
|
-
parent_thread_id?: string
|
|
24
|
-
|
|
25
|
-
// Many to one
|
|
26
|
-
/**
|
|
27
|
-
* Include workflow node key
|
|
28
|
-
*/
|
|
29
|
-
agentKey?: string
|
|
30
|
-
predecessor?: string
|
|
31
|
-
xpert?: IXpert
|
|
32
|
-
xpertId?: string
|
|
33
|
-
// Parent AgentExecution
|
|
34
|
-
parentId?: string
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Corresponds to the run in the [Agent Protocol](https://github.com/langchain-ai/agent-protocol).
|
|
39
|
-
*/
|
|
40
|
-
export type TXpertAgentExecution = TXpertExecution & {
|
|
41
|
-
/**
|
|
42
|
-
* Total token usage of chat model
|
|
43
|
-
*/
|
|
44
|
-
tokens?: number
|
|
45
|
-
/**
|
|
46
|
-
* Token usage of embedding
|
|
47
|
-
*/
|
|
48
|
-
embedTokens?: number
|
|
49
|
-
metadata?: TAgentExecutionMetadata
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Latency of response from provider (s)
|
|
53
|
-
*/
|
|
54
|
-
responseLatency?: number
|
|
55
|
-
// Token usage
|
|
56
|
-
totalPrice?: number
|
|
57
|
-
currency?: string
|
|
58
|
-
inputTokens?: number
|
|
59
|
-
inputUnitPrice?: number
|
|
60
|
-
inputPriceUnit?: number
|
|
61
|
-
outputTokens?: number
|
|
62
|
-
outputUnitPrice?: number
|
|
63
|
-
outputPriceUnit?: number
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Latest operation when interrupted
|
|
67
|
-
*/
|
|
68
|
-
operation?: TSensitiveOperation
|
|
69
|
-
|
|
70
|
-
// Stored messages or from checkpoints
|
|
71
|
-
messages?: StoredMessage[]
|
|
72
|
-
|
|
73
|
-
// Temporary properties
|
|
74
|
-
agent?: IXpertAgent
|
|
75
|
-
totalTokens?: number
|
|
76
|
-
/**
|
|
77
|
-
* Summary of conversation
|
|
78
|
-
*/
|
|
79
|
-
summary?: string
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Execution of agent or workflow nodes.
|
|
84
|
-
*
|
|
85
|
-
* Corresponds to the run in the [Agent Protocol](https://github.com/langchain-ai/agent-protocol).
|
|
86
|
-
*/
|
|
87
|
-
export interface IXpertAgentExecution extends IBasePerTenantAndOrganizationEntityModel, TXpertAgentExecution {
|
|
88
|
-
subExecutions?: IXpertAgentExecution[]
|
|
89
|
-
|
|
90
|
-
// Temporary properties
|
|
91
|
-
runningExecution?: IXpertAgentExecution
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Corresponds to the status of Run in [Agent Protocol](https://github.com/langchain-ai/agent-protocol).
|
|
96
|
-
*/
|
|
97
|
-
export enum XpertAgentExecutionStatusEnum {
|
|
98
|
-
RUNNING = 'running',
|
|
99
|
-
SUCCESS = 'success',
|
|
100
|
-
ERROR = 'error',
|
|
101
|
-
PENDING = 'pending',
|
|
102
|
-
TIMEOUT = 'timeout',
|
|
103
|
-
INTERRUPTED = 'interrupted'
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export type TAgentExecutionMetadata = {
|
|
107
|
-
/**
|
|
108
|
-
* AI model provider
|
|
109
|
-
*/
|
|
110
|
-
provider: string
|
|
111
|
-
/**
|
|
112
|
-
* AI Model
|
|
113
|
-
*/
|
|
114
|
-
model: string
|
|
115
|
-
}
|