From 56e4c8a0d777bf354b71c0d7459dcfc1f5974f66 Mon Sep 17 00:00:00 2001 From: ZJU_czx <952370295@qq.com> Date: Thu, 20 Mar 2025 10:56:08 +0800 Subject: [PATCH] feat: remove useless test code --- .../chart_visualization/src/chartVisualize.ts | 65 ------------------- 1 file changed, 65 deletions(-) diff --git a/app/tool/chart_visualization/src/chartVisualize.ts b/app/tool/chart_visualization/src/chartVisualize.ts index 352b894..7e93404 100644 --- a/app/tool/chart_visualization/src/chartVisualize.ts +++ b/app/tool/chart_visualization/src/chartVisualize.ts @@ -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();