Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
AI_server
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
node_server
AI_server
Commits
7e321b96
You need to sign in or sign up before continuing.
Commit
7e321b96
authored
Jan 27, 2026
by
chenjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
26570415
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
4 deletions
+61
-4
serverConfig.xml
serverConfig.xml
+2
-1
aidata.ts
src/biz/aidata.ts
+1
-1
aiAnswerData.ts
src/data/dataCenterInterface/aiAnswerData.ts
+56
-1
interfaceConfig.ts
src/data/interfaceConfig.ts
+2
-1
No files found.
serverConfig.xml
View file @
7e321b96
<config>
<port>
40005
</port>
<dataCenterInterface>
<answerText>
http://1
72.21.223.163
:18151/studio/api/megaindex/analysis/v1/nl/multi/scene/answer/text
</answerText>
<answerText>
http://1
9.100.67.55
:18151/studio/api/megaindex/analysis/v1/nl/multi/scene/answer/text
</answerText>
</dataCenterInterface>
</config>
\ No newline at end of file
src/biz/aidata.ts
View file @
7e321b96
...
...
@@ -10,7 +10,7 @@ export async function getAIAnswer(req, res) {
let
{
question
,
threadId
}
=
req
.
body
;
let
ret
:
any
=
{};
let
sceneUuids
=
[
"
11baa1d533e74a68b0503e6ef18016d4"
,
"34080148d14041eaaa60c622a03f7bc9"
,
"9a1022b6db784b3484dc7b8ea20590b4"
,
"06f751e96f8b4d6096d0be523b93ec5f
"
];
let
sceneUuids
=
[
"
35a688f447dc453ca4002a69bda11314"
,
"9fb21c884d6e400b85ec1ad7316369ea"
,
"9281a52c54c34a3da7df368a639250e0"
,
"8dc17c7484b2467bb74ffe6544309732
"
];
let
{
aiAnswerType
,
aiAnswerData
}
=
await
getAIAnswerInterface
(
question
,
sceneUuids
,
threadId
);
ret
[
"aiAnswerType"
]
=
aiAnswerType
;
...
...
src/data/dataCenterInterface/aiAnswerData.ts
View file @
7e321b96
...
...
@@ -10,9 +10,64 @@ import { AIANSWERTYPE } from "../../config/enum";
export
async
function
getAIAnswerInterface
(
question
,
sceneUuids
,
threadId
)
{
const
interfaceName
=
"获取问数结果信息"
;
let
body
=
{
question
,
sceneUuids
,
threadId
};
let
data
=
await
getInterfaceByInterfaceName
(
dataCenterInterfaceConfig
.
answerText
,
body
);
// let data = await getInterfaceByInterfaceName( dataCenterInterfaceConfig.answerText, body );
let
data
=
{
questionId
:
""
,
content
:
""
,
params
:[],
sample
:
null
}
/**----------------test */
if
(
question
==
"营销项目三明市商务局2025年“福建有口福”餐饮促消费活动今年共出奖多少钱"
)
{
data
.
sample
=
{
header
:[],
data
:[]};
data
.
sample
.
header
=
[
"餐饮促消费活动今年共出奖"
];
data
.
sample
.
data
=
[[
"1000000"
]];
}
if
(
question
==
"假设今天是2025年3月份的一天,项目25S3135000703单用户和单商户分别投入多少"
)
{
data
.
sample
=
{
header
:[],
data
:[]};
data
.
sample
.
header
=
[
"单用户投入(整体)"
,
"单商户投入(整体)"
];
data
.
sample
.
data
=
[[
"128.41497748946097"
,
"4548.841094599493"
]];
}
if
(
question
==
"谁负责的项目数最多,列出top5"
)
{
data
.
sample
=
{
header
:[],
data
:[]};
data
.
sample
.
header
=
[
"负责部门"
,
"营销项目编号(去重统计)"
];
data
.
sample
.
data
=
[
[
"张有怡"
,
"7"
],
[
"林宇"
,
"6"
],
[
"郭令玲"
,
"6"
],
[
"欧阳旻"
,
"4"
],
[
"周昀"
,
"3"
]
];
}
if
(
question
==
"今年营销项目带来多少收入"
)
{
data
.
content
=
"为您查询:项目启动时间${filterValue1}的收入${filterValue3}为636181.6320754716552286"
;
data
.
params
=
[
{
name
:
"filterValue1"
,
display
:
"大于等于2025-01-01"
},
{
name
:
"filterValue2"
,
display
:
"123"
},
{
name
:
"filterValue3"
,
display
:
"营销项目金额"
},
];
}
/**----------------test *//**----------------test */
// let sample = {header:[], data:[]};
// if (question == "营销项目三明市商务局2025年“福建有口福”餐饮促消费活动今年共出奖多少钱") {
// sample.header = ["餐饮促消费活动今年共出奖"];
...
...
src/data/interfaceConfig.ts
View file @
7e321b96
...
...
@@ -10,7 +10,8 @@ import { dataCenterInterfaceConfig } from "../config/serverConfig";
// body:{}
// }
let
Authorization
=
"38a96559-8f70-4df8-87f9-af3eb58fcc27"
;
// let Authorization = "38a96559-8f70-4df8-87f9-af3eb58fcc27";
let
Authorization
=
"579a041d-d0b0-465e-b6c3-54a91ceab02c"
;
export
const
Config
=
{
"获取问数结果信息"
:{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment