Commit 7e321b96 by chenjinjing

no message

parent 26570415
<config>
<port>40005</port>
<dataCenterInterface>
<answerText>http://172.21.223.163:18151/studio/api/megaindex/analysis/v1/nl/multi/scene/answer/text</answerText>
<answerText>http://19.100.67.55:18151/studio/api/megaindex/analysis/v1/nl/multi/scene/answer/text</answerText>
</dataCenterInterface>
</config>
\ No newline at end of file
......@@ -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;
......
......@@ -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 = ["餐饮促消费活动今年共出奖"];
......
......@@ -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 = {
"获取问数结果信息":{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment