feat: remove useless test code

This commit is contained in:
ZJU_czx
2025-03-20 10:56:08 +08:00
parent a0a535e2f9
commit 56e4c8a0d7
@@ -130,69 +130,4 @@ async function generateChart() {
}
}
async function test() {
const inputData = {
options: {
url: "https://ark.cn-beijing.volces.com/api/v3/chat/completions",
model: "ep-20250218181138-t86qb",
headers: {
"api-key": "5165caca-92dc-4c6b-936f-517a00d4aae3",
Authorization: "Bearer 5165caca-92dc-4c6b-936f-517a00d4aae3",
},
},
user_prompt: "帮我展示不同区域各商品销售额",
fieldInfo: [
{
fieldName: "商品名称",
type: "string",
role: "dimension",
domain: ["可乐", "雪碧", "芬达", "醒目"],
},
{
fieldName: "region",
type: "string",
role: "dimension",
domain: ["south", "east", "west", "north"],
},
{
fieldName: "销售额",
type: "int",
role: "measure",
domain: [28, 2350],
},
],
dataset: [
{ : "可乐", region: "south", 销售额: 2350 },
{ : "可乐", region: "east", 销售额: 1027 },
{ : "可乐", region: "west", 销售额: 1027 },
{ : "可乐", region: "north", 销售额: 1027 },
{ : "雪碧", region: "south", 销售额: 215 },
{ : "雪碧", region: "east", 销售额: 654 },
{ : "雪碧", region: "west", 销售额: 159 },
{ : "雪碧", region: "north", 销售额: 28 },
{ : "芬达", region: "south", 销售额: 345 },
{ : "芬达", region: "east", 销售额: 654 },
{ : "芬达", region: "west", 销售额: 2100 },
{ : "芬达", region: "north", 销售额: 1679 },
{ : "醒目", region: "south", 销售额: 1476 },
{ : "醒目", region: "east", 销售额: 830 },
{ : "醒目", region: "west", 销售额: 532 },
{ : "醒目", region: "north", 销售额: 498 },
],
output_type: "html",
};
const vmind2 = new VMind(inputData.options);
const res = await vmind2.generateChart(
inputData.user_prompt,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
inputData.fieldInfo as any,
inputData.dataset,
{
enableDataQuery: false,
theme: "light",
}
);
console.log(res);
}
// test();
generateChart();