Skip to content

Commit cd73702

Browse files
authored
Merge pull request #54 from meta-d/develop
Version 2.7.0
2 parents c300b9e + bc885e5 commit cd73702

File tree

720 files changed

+30458
-6638
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

720 files changed

+30458
-6638
lines changed

.deploy/api/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ COPY --chown=node:node packages/common/package.json ./packages/common/
3333
COPY --chown=node:node packages/config/package.json ./packages/config/
3434
COPY --chown=node:node packages/auth/package.json ./packages/auth/
3535
COPY --chown=node:node packages/server/package.json ./packages/server/
36+
COPY --chown=node:node packages/server-ai/package.json ./packages/server-ai/
3637
COPY --chown=node:node packages/adapter/package.json ./packages/adapter/
3738
COPY --chown=node:node packages/analytics/package.json ./packages/analytics/
3839

.deploy/api/package-prod.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "metad-server",
3-
"version": "2.6",
3+
"version": "2.7",
44
"license": "MIT",
55
"scripts": {
66
"start": "nx serve",
@@ -10,17 +10,17 @@
1010
},
1111
"private": true,
1212
"dependencies": {
13-
"@langchain/community": "0.2.20",
14-
"@langchain/core": "0.2.18",
15-
"@langchain/langgraph": "0.0.31",
16-
"@langchain/ollama": "0.0.4",
17-
"@langchain/openai": "0.2.4",
13+
"@langchain/community": "0.3.0",
14+
"@langchain/core": "0.3.1",
15+
"@langchain/langgraph": "0.2.3",
16+
"@langchain/ollama": "0.1.0",
17+
"@langchain/openai": "0.3.0",
1818
"@nestjs/common": "^8.0.0",
1919
"@nestjs/core": "^8.0.0",
2020
"@nestjs/platform-express": "^8.0.0",
2121
"@swc/helpers": "~0.5.0",
2222
"idb-keyval": "^6.0.2",
23-
"langchain": "0.2.10",
23+
"langchain": "0.3.2",
2424
"money-clip": "^3.0.5",
2525
"reflect-metadata": "^0.1.13",
2626
"rxjs": "^7.0.0",
@@ -32,6 +32,6 @@
3232
"packages/*"
3333
],
3434
"resolutions": {
35-
"@langchain/core": "0.2.18"
35+
"@langchain/core": "0.3.1"
3636
}
3737
}

.deploy/api/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ocap-server",
33
"author": "Metad",
4-
"version": "2.6",
4+
"version": "2.7",
55
"scripts": {
66
"start": "nx serve",
77
"build": "nx build",
@@ -10,17 +10,17 @@
1010
},
1111
"private": true,
1212
"dependencies": {
13-
"@langchain/community": "0.2.20",
14-
"@langchain/core": "0.2.18",
15-
"@langchain/langgraph": "0.0.31",
16-
"@langchain/ollama": "0.0.4",
17-
"@langchain/openai": "0.2.4",
13+
"@langchain/community": "0.3.0",
14+
"@langchain/core": "0.3.1",
15+
"@langchain/langgraph": "0.2.3",
16+
"@langchain/ollama": "0.1.0",
17+
"@langchain/openai": "0.3.0",
1818
"@nestjs/common": "^8.0.0",
1919
"@nestjs/core": "^8.0.0",
2020
"@nestjs/platform-express": "^8.0.0",
2121
"@swc/helpers": "~0.5.0",
2222
"idb-keyval": "^6.0.2",
23-
"langchain": "0.2.10",
23+
"langchain": "0.3.2",
2424
"money-clip": "^3.0.5",
2525
"reflect-metadata": "^0.1.13",
2626
"rxjs": "^7.0.0",
@@ -58,6 +58,6 @@
5858
"packages/*"
5959
],
6060
"resolutions": {
61-
"@langchain/core": "0.2.18"
61+
"@langchain/core": "0.3.1"
6262
}
6363
}

.deploy/webapp/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ RUN chmod +x /wait /entrypoint.compose.sh /entrypoint.prod.sh && dos2unix /entry
3333
WORKDIR /srv/pangolin
3434

3535
COPY --chown=node:node packages/contracts/package.json ./packages/contracts/
36+
COPY --chown=node:node packages/copilot-angular/package.json ./packages/copilot-angular/
3637

3738
RUN yarn config set network-timeout 300000
3839

.deploy/webapp/package.json

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ocap",
3-
"version": "2.6",
3+
"version": "2.7",
44
"description": "",
55
"license": "AGPL-3.0",
66
"homepage": "https://mtda.cloud",
@@ -45,11 +45,11 @@
4545
"@casl/angular": "^6.0.0",
4646
"@datorama/akita": "^6.2.3",
4747
"@duckdb/duckdb-wasm": "1.25.0",
48-
"@langchain/community": "0.2.20",
49-
"@langchain/core": "0.2.18",
50-
"@langchain/langgraph": "0.0.31",
51-
"@langchain/ollama": "0.0.4",
52-
"@langchain/openai": "0.2.4",
48+
"@langchain/community": "0.3.0",
49+
"@langchain/core": "0.3.1",
50+
"@langchain/langgraph": "0.2.3",
51+
"@langchain/ollama": "0.1.0",
52+
"@langchain/openai": "0.3.0",
5353
"@microsoft/fetch-event-source": "^2.0.1",
5454
"@ng-matero/extensions": "^13.1.0",
5555
"@ng-web-apis/common": "^2.0.1",
@@ -91,7 +91,7 @@
9191
"immer": "^10.0.1",
9292
"js-yaml": "^4.1.0",
9393
"json5": "^2.2.3",
94-
"langchain": "0.2.10",
94+
"langchain": "0.3.2",
9595
"lato-font": "^3.0.0",
9696
"lodash": "^4.17.21",
9797
"lodash-es": "^4.17.21",
@@ -109,7 +109,6 @@
109109
"ngxtension": "^3.1.2",
110110
"noto-serif-sc": "^8.0.0",
111111
"ollama": "^0.5.6",
112-
"openai": "^4.6.0",
113112
"prismjs": "^1.29.0",
114113
"quill": "^1.3.7",
115114
"rxjs": "~7.8.0",
@@ -194,7 +193,7 @@
194193
"packages/*"
195194
],
196195
"resolutions": {
197-
"@langchain/core": "0.2.18"
196+
"@langchain/core": "0.3.1"
198197
},
199198
"nx": {
200199
"includedScripts": []

.env.compose

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,9 @@ PM2_API_NAME=metad_api
138138
WEB_CONCURRENCY=1
139139
WEB_MEMORY=4096
140140

141+
# Toolsets
142+
TAVILY_API_KEY=
143+
SEARCHAPI_API_KEY=
144+
EXASEARCH_API_KEY=
145+
141146
# Features Toggles

.env.local

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,4 +142,9 @@ PM2_API_NAME=metad_api
142142
WEB_CONCURRENCY=1
143143
WEB_MEMORY=4096
144144

145+
# Toolsets
146+
TAVILY_API_KEY=
147+
SEARCHAPI_API_KEY=
148+
EXASEARCH_API_KEY=
149+
145150
# Features Toggles

README.md

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ English | [中文](./README_zh.md)
1010
</a>
1111
</p>
1212
<p align="center">
13-
<em>Open-Source Analytics Platform for Enterprise Data Analysis, Indicator Management and Reporting</em>
13+
<em>Open-Source AI Platform for Enterprise Data Analysis, Indicator Management and System Orchestration</em>
1414
</p>
1515
<p align="center">
1616
<a href="https://github.com/meta-d/ocap/" target="_blank">
@@ -30,38 +30,18 @@ English | [中文](./README_zh.md)
3030
# Metad Analytics Platform
3131

3232
## 💡 What's New
33-
### ChatBI: Natural Language-Driven Business Intelligence Analysis
34-
35-
[ChatBI](https://mtda.cloud/en/docs/chatbi) is an innovative feature we are introducing, combining chat functionality with business intelligence (BI) analysis capabilities. It offers users a more intuitive and convenient data analysis experience through natural language interaction. The main features of ChatBI include:
33+
### Xpert AI
3634

37-
1. **Natural Language Querying**: Users can ask questions in natural language and get data analysis results directly without needing to understand complex query languages. This feature allows even non-technical personnel to easily obtain data insights.
35+
**Xpert AI** is an enterprise-level AI system that integrates BI (Business Intelligence) indicators management and intelligent dialogue functionality. It features modules such as a knowledge base, data analysis toolset (ChatBI, ChatDB, Search), and more. It acts as a digital expert, providing intelligent assistant copilot services and is deeply integrated with Feishu (Lark) bots. *Xpert AI* leverages advanced AI technology to offer efficient decision support and information management for enterprises, helping users quickly obtain data insights, optimize business processes, and enhance overall operational efficiency.
3836

39-
2. **Multi-Turn Conversations**: Supports multi-turn conversations, allowing for continuous, context-aware interactions. The system remembers previous conversation content, enabling deeper and more precise data analysis.
37+
[More details](https://mtda.cloud/en/blog/releases-2-7-xpert)
4038

41-
3. **Support for Various Large Language Models**: ChatBI integrates multiple mainstream large language models, such as ChatGPT and Llama, enhancing the accuracy of natural language understanding and generation to meet different business needs and language support.
42-
4. **Security and Access Control**: Provides strict data security and access control to ensure the protection of sensitive data.
43-
5. **Integration with Multiple Data Sources**: Supports connection and integration with data from various sources, such as databases, cloud services, and SAP ERP systems, providing users with rich data sources.
39+
### ChatBI: Natural Language-Driven Business Intelligence Analysis
4440

45-
[More details](https://mtda.cloud/en/blog/releases-2-5-chatbi/)
41+
[ChatBI](https://mtda.cloud/en/docs/chatbi) is an innovative feature we are introducing, combining chat functionality with business intelligence (BI) analysis capabilities. It offers users a more intuitive and convenient data analysis experience through natural language interaction.
4642

4743
[ChatBI_Demo.mp4](https://github.com/user-attachments/assets/5f7c84be-2307-43cf-8342-bce39524e37d)
4844

49-
### Copilot Command Agents
50-
🎉🎉 New version brings several exciting new features, particularly a comprehensive upgrade to [Copilot Command](https://www.mtda.cloud/en/docs/server/copilot/#commands) and [Business Roles](https://www.mtda.cloud/en/docs/server/copilot/#business-roles).
51-
52-
- [New Version 2.4 - Copilot Multi-Agent Command](https://www.mtda.cloud/en/blog/releases-2-4-copilot-multi-agent).
53-
- [AI Digital Business Experts](https://www.mtda.cloud/en/#people-are-talking)
54-
55-
- **Copilot Command Agents**
56-
- _Dimension Members Retriever_: This feature dynamically retrieves and acquires key information of dimension members, helping users better understand data dimensions.
57-
- _Few Shot_: By retrieving similar examples, it provides more precise templates, making data analysis more aligned with actual needs.
58-
- _Suggestion_: Provides dynamic prompt completion functionality, helping users quickly generate high-quality analysis commands.
59-
- **Business Roles** The new version also adds the Business Roles feature to the AI Copilot. Users can switch business roles during use, allowing for more precise business analysis in different scenarios. Each business role has corresponding examples. When the Copilot executes an Agent, it selects the examples most relevant to the current task to send to the LLM, ensuring more accurate results.
60-
61-
[More details](https://www.mtda.cloud/en/blog/releases-2-3-copilot-agents-roles)
62-
63-
![copilot architecture](https://raw.githubusercontent.com/meta-d/meta-d/main/img/v2.3/copilot-architecture.png)
64-
6545
## 🎯 Mission
6646

6747
__"One Table, One Model, One Indicator System"__

README_zh.md

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,37 +11,19 @@
1111
[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/meta-d/ocap)
1212

1313
## 💡 新功能
14+
### Xpert AI
1415

15-
### ChatBI:自然语言驱动的商业智能分析
16+
**Xpert AI** 是一个企业级的AI系统,集成了BI(商业智能)指标管理和智能对话功能。它包含知识库、数据分析工具集(ChatBI、ChatDB、Search)等模块,充当数字专家,提供智能助手协作服务,并与飞书机器人深度集成。*Xpert AI* 利用先进的AI技术,为企业提供高效的决策支持和信息管理,帮助用户快速获取数据洞察,优化业务流程,提高整体运营效率。
17+
18+
[更多详情](https://mtda.cloud/blog/releases-2-7-xpert)
1619

17-
[ChatBI](https://mtda.cloud/docs/chatbi) 是我们新推出的一个创新功能,它将聊天功能与商业智能(BI)分析能力相结合,通过自然语言交互的方式,为用户提供更加直观和便捷的数据分析体验。以下是 ChatBI 的主要特点:
18-
1. **自然语言查询 (Natural Language Querying)**:用户可以使用自然语言提问,直接获取数据分析结果,无需掌握复杂的查询语言。这一功能让即便是非技术人员,也能轻松获取数据洞察。
19-
2. **多轮对话 (Multi-Turn Conversations)**:支持多轮对话功能,允许用户进行连续的、上下文相关的交互。系统能够记住前面的对话内容,使数据分析更加深入和精准。
20-
3. **支持各种大语言模型 (Various Large Language Models)**:ChatBI 集成了多种主流大语言模型,如 ChatGPT 和 Llama,提升了自然语言理解和生成的准确性,满足不同业务需求和语言支持。
21-
4. **安全与权限管理 (Security and Access Control)**:提供严格的数据安全和权限管理,确保敏感数据的保护。
22-
5. **集成多数据源 (Integration with Multiple Data Sources)**:支持连接和集成来自不同来源的数据,如数据库、云端服务、SAP ERP 系统等,为用户提供丰富的数据来源。
20+
### ChatBI:自然语言驱动的商业智能分析
2321

22+
[ChatBI](https://mtda.cloud/docs/chatbi) 是我们新推出的一个创新功能,它将聊天功能与商业智能(BI)分析能力相结合,通过自然语言交互的方式,为用户提供更加直观和便捷的数据分析体验。
2423
[更多详情](https://mtda.cloud/blog/releases-2-5-chatbi)
2524

2625
[ChatBI_Demo.mp4](https://github.com/user-attachments/assets/5f7c84be-2307-43cf-8342-bce39524e37d)
2726

28-
### 副驾命令智能体
29-
30-
🎉🎉 新版本带来了一些令人兴奋的新功能,特别是对 [Copilot Command](https://www.mtda.cloud/docs/server/copilot/#命令)[Business Roles](https://www.mtda.cloud/docs/server/copilot/#业务角色) 的全面升级。
31-
32-
- [新版本 2.4 - 副驾多智能体命令](https://www.mtda.cloud/blog/releases-2-4-copilot-multi-agent/)
33-
- [AI 数字业务专家](https://www.mtda.cloud/#people-are-talking)
34-
35-
- **副驾驶命令智能体**
36-
- _维度成员检索器_:此功能动态检索和获取维度成员的关键信息,帮助用户更好地理解数据维度。
37-
- _少量样本_:通过检索类似的示例,提供更精确的模板,使数据分析更符合实际需求。
38-
- _建议_:提供动态提示完成功能,帮助用户快速生成高质量的分析命令。
39-
- **业务角色** 新版本还向 AI Copilot 添加了业务角色功能。用户可以在使用过程中切换业务角色,以便在不同场景下进行更精确的业务分析。每个业务角色都有相应的示例。当 Copilot 执行 Agent 时,它会选择与当前任务最相关的示例发送到 LLM,以确保更准确的结果。
40-
41-
[更多详情](https://www.mtda.cloud/blog/releases-2-3-copilot-agents-roles)
42-
43-
![copilot architecture](https://raw.githubusercontent.com/meta-d/meta-d/main/img/v2.3/copilot-architecture.png)
44-
4527
## 🎯 宗旨
4628

4729
__“一张表,一个模型,一套指标体系”__

apps/api/src/main.ts

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,28 @@
1-
import { Logger, LogLevel } from '@nestjs/common'
2-
import { NestFactory, Reflector } from '@nestjs/core'
3-
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'
4-
import { AnalyticsModule, AnalyticsService, bootstrap, prepare, seedModule } from '@metad/analytics'
5-
import { AuthGuard, seedDefault, ServerAppModule, AppService, IntegrationLarkModule, LarkService } from '@metad/server-core'
6-
import { getConfig, setConfig, environment as env } from '@metad/server-config'
7-
import { json, urlencoded, text } from 'express'
8-
import * as expressSession from 'express-session';
1+
import { bootstrap, prepare, seedModule } from '@metad/analytics'
2+
import { seedDefault } from '@metad/server-core'
93
import yargs from 'yargs'
10-
import { AppModule } from './app/app.module'
114
import { pluginConfig } from './plugin-config'
125

13-
const LOGGER_LEVELS = ['error', 'warn', 'log', 'debug', 'verbose'] as LogLevel[]
14-
const LoggerIndex = LOGGER_LEVELS.findIndex((value) => value === (process.env.LOGGER_LEVEL || 'warn'))
15-
166
prepare()
177

8+
const argv: any = yargs(process.argv).argv
9+
const command = argv.command
10+
11+
if (command === 'seedModule') {
12+
seedModule(pluginConfig).catch((error: any) => {
13+
console.log(error)
14+
process.exit(1)
15+
})
16+
} else if (command === 'seed') {
17+
seedDefault(pluginConfig).catch((error: any) => {
18+
console.log(error)
19+
process.exit(1)
20+
})
21+
} else {
22+
bootstrap()
23+
}
24+
25+
1826
// async function bootstrap() {
1927
// const app = await NestFactory.create(AppModule, {
2028
// logger: LOGGER_LEVELS.slice(0, LoggerIndex + 1)
@@ -54,8 +62,6 @@ prepare()
5462
// const globalPrefix = 'api'
5563
// app.setGlobalPrefix(globalPrefix)
5664

57-
58-
5965
// // Seed default values
6066
// const serverService = app.select(ServerAppModule).get(AppService)
6167
// await serverService.seedDBIfEmpty()
@@ -83,19 +89,3 @@ prepare()
8389
// })
8490
// }
8591

86-
const argv: any = yargs(process.argv).argv
87-
const command = argv.command
88-
89-
if (command === 'seedModule') {
90-
seedModule(pluginConfig).catch((error: any) => {
91-
console.log(error)
92-
process.exit(1)
93-
})
94-
} else if(command === 'seed') {
95-
seedDefault(pluginConfig).catch((error: any) => {
96-
console.log(error);
97-
process.exit(1);
98-
})
99-
} else {
100-
bootstrap()
101-
}

0 commit comments

Comments
 (0)