Skip to content

Commit

Permalink
Merge pull request #53 from meta-d/develop
Browse files Browse the repository at this point in the history
version 2.6.0
  • Loading branch information
meta-d authored Aug 27, 2024
2 parents 6e2a2fa + 4a3be67 commit c300b9e
Show file tree
Hide file tree
Showing 34 changed files with 440 additions and 182 deletions.
2 changes: 1 addition & 1 deletion .deploy/api/package-prod.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "metad-server",
"version": "2.0.0",
"version": "2.6",
"license": "MIT",
"scripts": {
"start": "nx serve",
Expand Down
2 changes: 1 addition & 1 deletion .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.5.9",
"version": "2.6",
"scripts": {
"start": "nx serve",
"build": "nx build",
Expand Down
2 changes: 1 addition & 1 deletion .deploy/webapp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ocap",
"version": "2.5",
"version": "2.6",
"description": "",
"license": "AGPL-3.0",
"homepage": "https://mtda.cloud",
Expand Down
2 changes: 1 addition & 1 deletion apps/cloud/src/app/_app.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@import './features/_features.component';

.pac-page-header {
@apply flex flex-col justify-start items-start gap-2 px-4 pt-4;
@apply flex flex-col justify-start items-stretch gap-2 px-4 pt-4;
}
.pac-page-title {
@apply text-2xl font-bold;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
bg-white
dark:bg-neutral-900 dark:border-neutral-700"
>
<div class="flex items-center flex-grow gap-x-2">
<div class="flex items-center flex-grow">
<button class="p-1 rounded-lg hover:bg-black/5 dark:hover:bg-white/10"
[matTooltip]="'Copilot.NewChat' | translate: {Default: 'New chat'}"
[cdkMenuTriggerFor]="menu"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ocap",
"version": "2.5",
"version": "2.6",
"description": "",
"license": "AGPL-3.0",
"homepage": "https://mtda.cloud",
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metad/adapter",
"version": "2.5.9",
"version": "2.6.0",
"dependencies": {
"@sap/hana-client": "^2.20.20",
"axios": "^0.21.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/analytics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metad/analytics",
"version": "2.5.9",
"version": "2.6.0",
"type": "commonjs",
"license": "MIT",
"scripts": {
Expand Down
10 changes: 5 additions & 5 deletions packages/analytics/src/chatbi/conversation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { BehaviorSubject, firstValueFrom, Subject, switchMap, takeUntil } from '
import { ChatBIModelService } from '../chatbi-model/chatbi-model.service'
import { AgentState, createReactAgent } from '../core/index'
import { createDimensionMemberRetriever, SemanticModelMemberService } from '../model-member/index'
import { convertOcapSemanticModel, getSemanticModelKey, NgmDSCoreService, registerModel } from '../model/ocap'
import { getSemanticModelKey, NgmDSCoreService, registerModel } from '../model/ocap'
import { ChatBIService } from './chatbi.service'
import { markdownCubes } from './graph/index'
import { createLLM } from './llm'
Expand Down Expand Up @@ -188,7 +188,7 @@ export class ChatBIConversation implements IChatBIConversation {
}
})

const models = items.map((item) => ({...item, model: convertOcapSemanticModel(item.model)}))
const models = items

this.logger.debug(`Chat models visits:`, models.map(({ visits }) => visits).join(', '))

Expand Down Expand Up @@ -320,13 +320,13 @@ ${makeCubeRulesPrompt()}
${PROMPT_RETRIEVE_DIMENSION_MEMBER}
${PROMPT_TIME_SLICER}
If you have any questions about how to analysis data (such as 'how to create a formula of calculated measure', 'how to create some type chart', 'how to create a time slicer about relative time'), please call 'referencesRetriever' tool to get the reference documentations.
If you have any questions about how to analysis data (such as 'how to create some type chart', 'how to create a time slicer about relative time'), please call 'referencesRetriever' tool to get the reference documentations.
${createAgentStepsInstructions(
`Extract the information mentioned in the problem into 'dimensions', 'measurements', 'time', 'slicers', etc.`,
`For every measure, determine whether it exists in the cube context, if it does, proceed directly to the next step, if not found, call the 'createIndicator' tool to create new calculated measure for it. After creating the measure, you need to call the subsequent steps to re-answer the complete answer.`,
CubeVariablePrompt,
`If the time condition is a specified fixed time (such as 2023 year, 202202, 2020 Q1), please add it to 'slicers' according to the time dimension. If the time condition is relative (such as this month, last month, last year), please add it to 'timeSlicers'.`,
`If the time condition is a specified fixed time (such as xxxx year, yyyyMM, yyyy Q1), please add it to 'slicers' according to the time dimension. If the time condition is relative (such as this month, last month, last year, this year), please add it to 'timeSlicers'.`,
`Then call 'answerQuestion' tool to show complete answer to user, don't create image for answer`,
`Finally, ref to the result of 'answerQuestion' tool, call 'giveMoreQuestions' tool to give more analysis suggestions`
)}
Expand Down Expand Up @@ -453,7 +453,7 @@ ${createAgentStepsInstructions(
if (['thinking', 'continuing', 'waiting'].includes(this.message?.status)) {
this.message.update({
status: 'error',
elements: [{tag: 'markdown', content: `出现内部错误:\n${verboseContent}`}]
elements: [{tag: 'markdown', content: verboseContent}]
})
}
}
Expand Down
3 changes: 2 additions & 1 deletion packages/analytics/src/chatbi/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ export class ChatLarkMessage {
type: 'text',
complex_interaction: true,
width: 'default',
size: 'medium'
size: 'medium',
value: C_CHATBI_END_CONVERSATION
},
{
tag: 'button',
Expand Down
Loading

0 comments on commit c300b9e

Please sign in to comment.