Skip to content

Commit

Permalink
Merge pull request #54 from meta-d/develop
Browse files Browse the repository at this point in the history
Version 2.7.0
  • Loading branch information
tiven-w authored Oct 5, 2024
2 parents c300b9e + bc885e5 commit cd73702
Show file tree
Hide file tree
Showing 720 changed files with 30,458 additions and 6,638 deletions.
1 change: 1 addition & 0 deletions .deploy/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ COPY --chown=node:node packages/common/package.json ./packages/common/
COPY --chown=node:node packages/config/package.json ./packages/config/
COPY --chown=node:node packages/auth/package.json ./packages/auth/
COPY --chown=node:node packages/server/package.json ./packages/server/
COPY --chown=node:node packages/server-ai/package.json ./packages/server-ai/
COPY --chown=node:node packages/adapter/package.json ./packages/adapter/
COPY --chown=node:node packages/analytics/package.json ./packages/analytics/

Expand Down
16 changes: 8 additions & 8 deletions .deploy/api/package-prod.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "metad-server",
"version": "2.6",
"version": "2.7",
"license": "MIT",
"scripts": {
"start": "nx serve",
Expand All @@ -10,17 +10,17 @@
},
"private": true,
"dependencies": {
"@langchain/community": "0.2.20",
"@langchain/core": "0.2.18",
"@langchain/langgraph": "0.0.31",
"@langchain/ollama": "0.0.4",
"@langchain/openai": "0.2.4",
"@langchain/community": "0.3.0",
"@langchain/core": "0.3.1",
"@langchain/langgraph": "0.2.3",
"@langchain/ollama": "0.1.0",
"@langchain/openai": "0.3.0",
"@nestjs/common": "^8.0.0",
"@nestjs/core": "^8.0.0",
"@nestjs/platform-express": "^8.0.0",
"@swc/helpers": "~0.5.0",
"idb-keyval": "^6.0.2",
"langchain": "0.2.10",
"langchain": "0.3.2",
"money-clip": "^3.0.5",
"reflect-metadata": "^0.1.13",
"rxjs": "^7.0.0",
Expand All @@ -32,6 +32,6 @@
"packages/*"
],
"resolutions": {
"@langchain/core": "0.2.18"
"@langchain/core": "0.3.1"
}
}
16 changes: 8 additions & 8 deletions .deploy/api/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ocap-server",
"author": "Metad",
"version": "2.6",
"version": "2.7",
"scripts": {
"start": "nx serve",
"build": "nx build",
Expand All @@ -10,17 +10,17 @@
},
"private": true,
"dependencies": {
"@langchain/community": "0.2.20",
"@langchain/core": "0.2.18",
"@langchain/langgraph": "0.0.31",
"@langchain/ollama": "0.0.4",
"@langchain/openai": "0.2.4",
"@langchain/community": "0.3.0",
"@langchain/core": "0.3.1",
"@langchain/langgraph": "0.2.3",
"@langchain/ollama": "0.1.0",
"@langchain/openai": "0.3.0",
"@nestjs/common": "^8.0.0",
"@nestjs/core": "^8.0.0",
"@nestjs/platform-express": "^8.0.0",
"@swc/helpers": "~0.5.0",
"idb-keyval": "^6.0.2",
"langchain": "0.2.10",
"langchain": "0.3.2",
"money-clip": "^3.0.5",
"reflect-metadata": "^0.1.13",
"rxjs": "^7.0.0",
Expand Down Expand Up @@ -58,6 +58,6 @@
"packages/*"
],
"resolutions": {
"@langchain/core": "0.2.18"
"@langchain/core": "0.3.1"
}
}
1 change: 1 addition & 0 deletions .deploy/webapp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ RUN chmod +x /wait /entrypoint.compose.sh /entrypoint.prod.sh && dos2unix /entry
WORKDIR /srv/pangolin

COPY --chown=node:node packages/contracts/package.json ./packages/contracts/
COPY --chown=node:node packages/copilot-angular/package.json ./packages/copilot-angular/

RUN yarn config set network-timeout 300000

Expand Down
17 changes: 8 additions & 9 deletions .deploy/webapp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ocap",
"version": "2.6",
"version": "2.7",
"description": "",
"license": "AGPL-3.0",
"homepage": "https://mtda.cloud",
Expand Down Expand Up @@ -45,11 +45,11 @@
"@casl/angular": "^6.0.0",
"@datorama/akita": "^6.2.3",
"@duckdb/duckdb-wasm": "1.25.0",
"@langchain/community": "0.2.20",
"@langchain/core": "0.2.18",
"@langchain/langgraph": "0.0.31",
"@langchain/ollama": "0.0.4",
"@langchain/openai": "0.2.4",
"@langchain/community": "0.3.0",
"@langchain/core": "0.3.1",
"@langchain/langgraph": "0.2.3",
"@langchain/ollama": "0.1.0",
"@langchain/openai": "0.3.0",
"@microsoft/fetch-event-source": "^2.0.1",
"@ng-matero/extensions": "^13.1.0",
"@ng-web-apis/common": "^2.0.1",
Expand Down Expand Up @@ -91,7 +91,7 @@
"immer": "^10.0.1",
"js-yaml": "^4.1.0",
"json5": "^2.2.3",
"langchain": "0.2.10",
"langchain": "0.3.2",
"lato-font": "^3.0.0",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
Expand All @@ -109,7 +109,6 @@
"ngxtension": "^3.1.2",
"noto-serif-sc": "^8.0.0",
"ollama": "^0.5.6",
"openai": "^4.6.0",
"prismjs": "^1.29.0",
"quill": "^1.3.7",
"rxjs": "~7.8.0",
Expand Down Expand Up @@ -194,7 +193,7 @@
"packages/*"
],
"resolutions": {
"@langchain/core": "0.2.18"
"@langchain/core": "0.3.1"
},
"nx": {
"includedScripts": []
Expand Down
5 changes: 5 additions & 0 deletions .env.compose
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,9 @@ PM2_API_NAME=metad_api
WEB_CONCURRENCY=1
WEB_MEMORY=4096

# Toolsets
TAVILY_API_KEY=
SEARCHAPI_API_KEY=
EXASEARCH_API_KEY=

# Features Toggles
5 changes: 5 additions & 0 deletions .env.local
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,9 @@ PM2_API_NAME=metad_api
WEB_CONCURRENCY=1
WEB_MEMORY=4096

# Toolsets
TAVILY_API_KEY=
SEARCHAPI_API_KEY=
EXASEARCH_API_KEY=

# Features Toggles
32 changes: 6 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ English | [中文](./README_zh.md)
</a>
</p>
<p align="center">
<em>Open-Source Analytics Platform for Enterprise Data Analysis, Indicator Management and Reporting</em>
<em>Open-Source AI Platform for Enterprise Data Analysis, Indicator Management and System Orchestration</em>
</p>
<p align="center">
<a href="https://github.com/meta-d/ocap/" target="_blank">
Expand All @@ -30,38 +30,18 @@ English | [中文](./README_zh.md)
# Metad Analytics Platform

## 💡 What's New
### ChatBI: Natural Language-Driven Business Intelligence Analysis

[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:
### Xpert AI

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.
**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.

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.
[More details](https://mtda.cloud/en/blog/releases-2-7-xpert)

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.
4. **Security and Access Control**: Provides strict data security and access control to ensure the protection of sensitive data.
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.
### ChatBI: Natural Language-Driven Business Intelligence Analysis

[More details](https://mtda.cloud/en/blog/releases-2-5-chatbi/)
[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.

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

### Copilot Command Agents
🎉🎉 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).

- [New Version 2.4 - Copilot Multi-Agent Command](https://www.mtda.cloud/en/blog/releases-2-4-copilot-multi-agent).
- [AI Digital Business Experts](https://www.mtda.cloud/en/#people-are-talking)

- **Copilot Command Agents**
- _Dimension Members Retriever_: This feature dynamically retrieves and acquires key information of dimension members, helping users better understand data dimensions.
- _Few Shot_: By retrieving similar examples, it provides more precise templates, making data analysis more aligned with actual needs.
- _Suggestion_: Provides dynamic prompt completion functionality, helping users quickly generate high-quality analysis commands.
- **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.

[More details](https://www.mtda.cloud/en/blog/releases-2-3-copilot-agents-roles)

![copilot architecture](https://raw.githubusercontent.com/meta-d/meta-d/main/img/v2.3/copilot-architecture.png)

## 🎯 Mission

__"One Table, One Model, One Indicator System"__
Expand Down
30 changes: 6 additions & 24 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,19 @@
[![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)

## 💡 新功能
### Xpert AI

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

[更多详情](https://mtda.cloud/blog/releases-2-7-xpert)

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

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

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

### 副驾命令智能体

🎉🎉 新版本带来了一些令人兴奋的新功能,特别是对 [Copilot Command](https://www.mtda.cloud/docs/server/copilot/#命令)[Business Roles](https://www.mtda.cloud/docs/server/copilot/#业务角色) 的全面升级。

- [新版本 2.4 - 副驾多智能体命令](https://www.mtda.cloud/blog/releases-2-4-copilot-multi-agent/)
- [AI 数字业务专家](https://www.mtda.cloud/#people-are-talking)

- **副驾驶命令智能体**
- _维度成员检索器_:此功能动态检索和获取维度成员的关键信息,帮助用户更好地理解数据维度。
- _少量样本_:通过检索类似的示例,提供更精确的模板,使数据分析更符合实际需求。
- _建议_:提供动态提示完成功能,帮助用户快速生成高质量的分析命令。
- **业务角色** 新版本还向 AI Copilot 添加了业务角色功能。用户可以在使用过程中切换业务角色,以便在不同场景下进行更精确的业务分析。每个业务角色都有相应的示例。当 Copilot 执行 Agent 时,它会选择与当前任务最相关的示例发送到 LLM,以确保更准确的结果。

[更多详情](https://www.mtda.cloud/blog/releases-2-3-copilot-agents-roles)

![copilot architecture](https://raw.githubusercontent.com/meta-d/meta-d/main/img/v2.3/copilot-architecture.png)

## 🎯 宗旨

__“一张表,一个模型,一套指标体系”__
Expand Down
50 changes: 20 additions & 30 deletions apps/api/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
import { Logger, LogLevel } from '@nestjs/common'
import { NestFactory, Reflector } from '@nestjs/core'
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'
import { AnalyticsModule, AnalyticsService, bootstrap, prepare, seedModule } from '@metad/analytics'
import { AuthGuard, seedDefault, ServerAppModule, AppService, IntegrationLarkModule, LarkService } from '@metad/server-core'
import { getConfig, setConfig, environment as env } from '@metad/server-config'
import { json, urlencoded, text } from 'express'
import * as expressSession from 'express-session';
import { bootstrap, prepare, seedModule } from '@metad/analytics'
import { seedDefault } from '@metad/server-core'
import yargs from 'yargs'
import { AppModule } from './app/app.module'
import { pluginConfig } from './plugin-config'

const LOGGER_LEVELS = ['error', 'warn', 'log', 'debug', 'verbose'] as LogLevel[]
const LoggerIndex = LOGGER_LEVELS.findIndex((value) => value === (process.env.LOGGER_LEVEL || 'warn'))

prepare()

const argv: any = yargs(process.argv).argv
const command = argv.command

if (command === 'seedModule') {
seedModule(pluginConfig).catch((error: any) => {
console.log(error)
process.exit(1)
})
} else if (command === 'seed') {
seedDefault(pluginConfig).catch((error: any) => {
console.log(error)
process.exit(1)
})
} else {
bootstrap()
}


// async function bootstrap() {
// const app = await NestFactory.create(AppModule, {
// logger: LOGGER_LEVELS.slice(0, LoggerIndex + 1)
Expand Down Expand Up @@ -54,8 +62,6 @@ prepare()
// const globalPrefix = 'api'
// app.setGlobalPrefix(globalPrefix)



// // Seed default values
// const serverService = app.select(ServerAppModule).get(AppService)
// await serverService.seedDBIfEmpty()
Expand Down Expand Up @@ -83,19 +89,3 @@ prepare()
// })
// }

const argv: any = yargs(process.argv).argv
const command = argv.command

if (command === 'seedModule') {
seedModule(pluginConfig).catch((error: any) => {
console.log(error)
process.exit(1)
})
} else if(command === 'seed') {
seedDefault(pluginConfig).catch((error: any) => {
console.log(error);
process.exit(1);
})
} else {
bootstrap()
}
1 change: 1 addition & 0 deletions apps/cloud/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
],
"styles": [
"packages/angular/_index.scss",
"packages/copilot-angular/_index.scss",
"apps/cloud/src/styles.scss"
],
"stylePreprocessorOptions": {
Expand Down
1 change: 1 addition & 0 deletions apps/cloud/src/app/@core/constants/app.constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export const API_VISITS = API_PREFIX + '/visits'
export const API_FEEDS = API_PREFIX + '/feeds'
export const API_COPILOT_KNOWLEDGE = API_PREFIX + '/copilot-knowledge'
export const API_COPILOT_ROLE = API_PREFIX + '/copilot-role'
export const API_XPERT_ROLE = API_PREFIX + '/xpert-role'
export const API_COPILOT_USER = API_PREFIX + '/copilot-user'
export const API_COPILOT_ORGANIZATION = API_PREFIX + '/copilot-organization'
export const API_COPILOT_CHECKPOINT = API_PREFIX + '/copilot-checkpoint'
Loading

0 comments on commit cd73702

Please sign in to comment.