Code Monkey home page Code Monkey logo

vmind's People

Contributors

bestony avatar da730 avatar eltociear avatar github-actions[bot] avatar kkxxkk2019 avatar lucaschang95 avatar maxtunelee avatar neuqzxy avatar pairone avatar purpose233 avatar skie1997 avatar ssfxz avatar xiaoluohe avatar xile611 avatar xsy-kucha avatar xuanhun avatar zamhown avatar zthxxx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vmind's Issues

[Bug] data aggregation failed

Version

1.2.4

Link to Minimal Reproduction

null

Steps to Reproduce

Key,BP,Count\nJIRA-27358,BP1.4.1,1\nJIRA-27356,BP1.4.1,1\nJIRA-27350,BP1.5.0,1\nJIRA-27349,BP1.4.1,1\nJIRA-27348,BP1.4.1,1\nJIRA-27347,BP1.4.1,1\nJIRA-27344,BP1.5.0,1\nJIRA-27343,BP1.4.1,1\nJIRA-27339,BP1.4.1,1\nJIRA-27338,BP1.4.1,1\nJIRA-27336,BP1.4.1,1\nJIRA-27335,BP1.4.1,1\nJIRA-27334,BP1.4.1,1\nJIRA-27333,BP1.5.0,1\nJIRA-27331,BP1.4.1,1\nJIRA-27330,BP1.4.1,1\nJIRA-27322,BP1.4.1,1\nJIRA-27321,BP1.4.1,1\nJIRA-27320,BP1.4.0,1\nJIRA-27319,BP1.4.0,1\nJIRA-27316,BP1.4.0,1\nJIRA-27315,BP1.4.1,1\nJIRA-27314,BP1.5.0,1\nJIRA-27311,BP1.4.1,1\nJIRA-27310,BP1.4.1,1\nJIRA-27309,BP1.4.1,1\nJIRA-27308,BP1.4.1,1\nJIRA-27307,BP1.4.1,1\nJIRA-27306,BP1.4.1,1\nJIRA-27305,BP1.4.1,1\nJIRA-27304,BP1.4.1,1\nJIRA-27303,BP1.4.1,1\nJIRA-27302,BP1.4.1,1\nJIRA-27301,BP1.4.1,1\nJIRA-27300,BP1.4.1,1\nJIRA-27299,BP1.4.1,1\nJIRA-27297,BP1.4.1,1\nJIRA-27296,BP1.4.1,1\nJIRA-27295,BP1.4.1,1\nJIRA-27294,BP1.4.1,1\nJIRA-27293,BP1.4.1,1\nJIRA-27292,BP1.4.1,1\nJIRA-27291,BP1.4.1,1\nJIRA-27290,BP1.5.0,1\nJIRA-27289,BP1.4.1,1\nJIRA-27281,BP1.4.1,1\nJIRA-27279,BP1.4.0,1\nJIRA-27278,BP1.4.1,1\nJIRA-27277,BP1.4.0,1\nJIRA-27276,BP1.4.0,1

按照bp分类统计count之和,绘制柱状堆叠图

Current Behavior

img_v3_029i_feeb1eb4-7483-453c-aa62-5bbf60911fdg

Expected Behavior

使用聚合后的数据生成图表

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

[Bug] YAML has : and throw an error in chart generation using skylark

Version

1.1.0

Link to Minimal Reproduction

null

Steps to Reproduce

userPrompt: 请推荐最佳的数据可视化展现方式
GPT 3.5 and skylark2 pro all throw an error.
image

Current Behavior

image Both the yaml.load and chartAdvisor throw an error: image

Expected Behavior

generate chart normally

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

[Bug] measure value is 0 when use fieldInfo from parseCSVDataWithLLM

Version

1.2.3

Link to Minimal Reproduction

null

Steps to Reproduce

帮我展示不同区域各商品销售额
商品名称,region,销售额
可乐,south,2350
可乐,east,1027
可乐,west,1027
可乐,north,1027
雪碧,south,215
雪碧,east,654
雪碧,west,159
雪碧,north,28
芬达,south,345
芬达,east,654
芬达,west,2100
芬达,north,1679
醒目,south,1476
醒目,east,830
醒目,west,532
醒目,north,498

const { fieldInfo, dataset } = await vmind.current.parseCSVData(csvData, describe);
      const { spec, time } = await vmind.current.generateChart(
        describe,
        fieldInfo,
        dataset,
      );

Current Behavior

{
"sql": "SELECT Product name, region, SUM(Sales) AS total_sales FROM dataSource GROUP BY Product name, region",
"fieldInfo": [
{
"fieldName": "Product name",
"description": "Represents the name of the product."
},
{
"fieldName": "region",
"description": "Represents the region where the product is sold."
},
{
"fieldName": "total_sales",
"description": "An aggregated field representing the total sales amount of each product in each region. It is generated by summing up the sales values for each product in each region."
}
]
}
and the aggregated measure value is all 0

Expected Behavior

aggregate normally

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

[Feature] use vector database to query examples and fill in chart generation prompt.

What problem does this feature solve?

to increase the accuracy of chart generation, use vector database to query exapmles according to user's input and fill the result in chart generation prompt. This can be done when VMind has collected enough chart generation examples.

What does the proposed API look like?

queryExamples(userInput)

missing a field in data

--data-raw '{"csvData":"filter_r,a_type_label,prr_tags,app_id,abtest_versions,r_reasons,r_tags,channel_id,region,uid,vid_int,timestamp,trace_id\r\n,,,1233,,,,112,US,7092296493822592046,,1708445808150,2024022016164529A8B0CD0A1AEBED59C1\r\n,,,1233,,,,57,US,7092296493822592046,,1708445389846,202402201609497136D67B0F97D0E072E4\r\n,,,1233,,,,81,US,7092296493822592046,,1708525298858,20240221142138A866F61C2102DE076789\r\n,,,1233,,,,112,US,7092296493822592046,,1708867031297,20240225131710A436704DA937A7C72C7E\r\n,,,1233,,,,112,US,7092296493822592046,,1708610066492,202402221354256D11E714CFF5812E5944\r\n,,,1233,,,,112,US,7092296493822592046,,1708867539587,20240225132539E1B41CFDC4CA6C7D6B23\r\n,,,1233,,,,112,US,7092296493822592046,,1708525412066,202402211423318BAA53BC0648780C1A50\r\n,,,1233,,,,112,US,7092296493822592046,,1708867378664,2024022513225849549B50310E70CCBCB0\r\n,,,1233,,,,112,US,7092296493822592046,,1708867413105,20240225132332AA2CFEF9F4DDAFC645F6\r\n,,,1233,,,,112,US,7092296493822592046,,1708867493206,20240225132452B1C06A032A58CDBE709D\r\n,,,1233,,,,81,US,7092296493822592046,,1708778690534,20240224124450B7DD2AF1F6456415B9D4\r\n,,,1233,,,,199,US,7092296493822592046,,1708446088298,20240220162127028C9A44474E820AD6D8\r\n,,,1233,,,,112,US,7092296493822592046,,1708525477107,202402211424363EB0AAE89450ADD82476\r\n,,,1233,,,,81,US,7092296493822592046,,1708866956971,20240225131556726A95F72884A245C786\r\n,,,1233,,,,81,US,7092296493822592046,,1708445383055,202402201609424EB937059B320908E945\r\n,,,1233,,,,81,US,7092296493822592046,,1708866955521,2024022513155557DCB3F6E16D834367BB\r\n,,,1233,,,,112,US,7092296493822592046,,1708866921143,20240225131520A834042EBFBFE69DEB8D\r\n,,,1233,,,,81,US,7092296493822592046,,1708445387314,20240220160947B7E58F06F01A600A1D89\r\n,,,1233,,,,57,US,7092296493822592046,,1708866705920,20240225131145BF96E65D2170CE9EDD74\r\n,,,1233,,,,81,US,7092296493822592046,,1708696269252,20240223135109AD8C4B063FF90E11DE4A\r\n,,,1233,,,,81,US,7092296493822592046,,1708525300274,202402211421406DA69D0D4B109907247B\r\n,,,1233,,,,112,US,7092296493822592046,,1708696316767,20240223135156C054F110E2DCEF2A17FF\r\n,,,1233,,,,57,US,7092296493822592046,,1708780057459,20240224130737AD1422BAA86115E48421\r\n,,,1233,,,,81,US,7092296493822592046,,1708778691908,2024022412445168962D3FED452616CBC8\r\n,,,1233,,,,112,US,7092296493822592046,,1708867293249,20240225132132E7A7B63D8806E7B2669C\r\n,,,1233,,,,57,US,7092296493822592046,,1708830915190,20240225031514DA8D786AF956F3B3151E\r\n,,,1233,,,,199,US,7092296493822592046,,1708867020337,20240225131700BA96658227C3263D9FFB\r\n,,,1233,,,,112,US,7092296493822592046,,1708610183381,202402221356226A7787CFFCB3B3114B59\r\n,,,1233,,,,112,US,7092296493822592046,,1708445377163,20240220160936953B3302117F81C114EC\r\n,,,1233,,,,112,US,7092296493822592046,,1708445576957,20240220161256D50449D1328057A6BD06\r\n,,,1233,,,,112,US,7092296493822592046,,1708829558775,20240225025237CBDEFBA79C617EBD9D1C\r\n,,,1233,,,,112,US,7092296493822592046,,1708445743592,20240220161542266C6CB4CBA382E968C2\r\n,,,1233,,,,112,US,7092296493822592046,,1708445805356,2024022016164529A8B0CD0A1AEBED59C1\r\n,,,1233,,,,112,US,7092296493822592046,,1708829643717,20240225025403D1FC6676586CB0905BA4\r\n,,,1233,,,,112,US,7092296493822592046,,1708867458566,20240225132418AA2CFEF9F4DDAFC64C08\r\n,,,1233,,,,57,US,7092296493822592046,,1708829561662,20240225025241AD1DEF6A5E605EB09A41\r\n,,,1233,,,,199,US,7092296493822592046,,1708446060872,2024022016210090140F31FA12220A7D07\r\n,,,1233,,,,57,US,7092296493822592046,,1708866924109,202402251315234A814EC71071DF0BD7BA\r\n,,,1233,,,,112,US,7092296493822592046,,1708696468585,2024022313542700D9ED5E8EF761717DB0\r\n,,,1233,,,,112,US,7092296493822592046,,1708696711378,202402231358302CEAD44D98039B2DD7F7\r\n,,,1233,,,,112,US,7092296493822592046,,1708696888515,202402231401289ACBCA53809D603CB427\r\n,,,1233,,,,112,US,7092296493822592046,,1708697684980,20240223141444F63C2904943A35394266\r\n,,,1233,,,,112,US,7092296493822592046,,1708696523386,2024022313552333351F9918D7AEFBC917\r\n,,,1233,,,,112,US,7092296493822592046,,1708778718828,20240224124518678C6C73CA659783014F\r\n,,,1233,,,,199,US,7092296493822592046,,1708867002606,202402251316421204BD6B6E8A1543DF6D\r\n,,,1233,,,,81,US,7092296493822592046,,1708610072970,20240222135432AAB3121782186419DC89\r\n,,,1233,,,,36,US,7092296493822592046,,1708615362521,20240222152241EF0B669DEEE0E496F96F\r\n,,,1233,,,,112,US,7092296493822592046,,1708778675358,2024022412443493EB0DEC9C052B74105B\r\n,,,1233,,,,81,US,7092296493822592046,,1708610087681,202402221354477146569C78F80D18EA96\r\n,,,1233,,,,112,US,7092296493822592046,,1708697729569,2024022314152925857C95174C5170FFE1\r\n,,,1233,,,,112,US,7092296493822592046,,1708830914020,20240225031512773AB90FAACEEAAB0EC3\r\n,,,1233,,,,57,US,7092296493822592046,,1708525297721,2024022114213712CCCD5815C1AD2EC79C\r\n,,,1233,,,,112,US,7092296493822592046,,1708696389687,2024022313530844B7446267116F43B927\r\n,,,1233,,,,112,US,7092296493822592046,,1708696778238,20240223135937AE668F844C9E674014AA\r\n,,,1233,,,,112,US,7092296493822592046,,1708778853424,202402241247320E708EB8477261C354EC\r\n,,,1233,,,,57,US,7092296493822592046,,1708612888542,202402221441278D67B0C690E5271CF702\r\n,,,1233,,,,112,US,7092296493822592046,,1708525497626,202402211424572C71AF81DF15F3D58A12\r\n,,,1233,,,,112,US,7092296493822592046,,1708696264074,202402231351039FE818735839B051969E\r\n,,,1233,,,,112,US,7092296493822592046,,1708696837646,202402231400365EC5C2DC236F465D4E58\r\n,,,1233,,,,112,US,7092296493822592046,,1708866686273,202402251311254A6702F97C70EFB028C9\r\n,,,1233,,,,81,US,7092296493822592046,,1708696270906,202402231351101A6B548FA0EF34105774\r\n,,,1233,,,,112,US,7092296493822592046,,1708612905678,202402221441452F5FE2073237C10F57E7\r\n,,,1233,,,,199,US,7092296493822592046,,1708446029499,20240220162029CC9A407970F27F0A4877\r\n,,,1233,,,,112,US,7092296493822592046,,1708867137922,20240225131856472BE356E5350FABC73D\r\n,,,1233,,,,112,US,7092296493822592046,,1708610245415,2024022213572577901A133CFB2CCC0B92\r\n,,,1233,,,,57,US,7092296493822592046,,1708696266988,20240223135106160FFA6ADCFEDF73CA64\r\n,,,1233,,,,112,US,7092296493822592046,,1708615460784,202402221524199564A8038AF9AA36444C\r\n,,,1233,,,,57,US,7092296493822592046,,1708778687975,20240224124447386C3BC31D8413A29048\r\n,,,1233,,,,81,US,7092296493822592046,,1708778691688,20240224124451E04E8393FD062E163F63\r\n,,,1233,,,,112,US,7092296493822592046,,1708780055058,2024022413073490F4C59A20694E5BAB87\r\n,,,1233,,,,112,US,7092296493822592046,,1708866728857,202402251312084C2A820F878915C26092\r\n,,,1233,,,,57,US,7092296493822592046,,1708610081294,202402221354413A683CB601C0DB53ED1C\r\n,,,1233,,,,112,US,7092296493822592046,,1708525451364,2024022114241123B931A468FC56D27B6C","prompt":"show me the distribution","model":"gpt-3.5-turbo"}'

新增导出图表图片、GIF API

  1. 根据当前环境,调用VChart图片导出API生成图表图片
  2. 调研canvas图表转GIF和视频方案,为VMind增加图表转gif、视频接口
    接口示例:
const res=vmind.exportChart(spec,type) //type可以是image, gif或video

[Bug] Order by does not work on dataAggregation.

Version

1.2.3

Link to Minimal Reproduction

null

Steps to Reproduce

帮我展示north区域排名前三的商品销售额

商品名称,region,销售额
可乐,south,2350
可乐,east,1027
可乐,west,1027
可乐,north,1027
雪碧,south,215
雪碧,east,654
雪碧,west,159
雪碧,north,28
芬达,south,345
芬达,east,654
芬达,west,2100
芬达,north,1679
醒目,south,1476
醒目,east,830
醒目,west,532
醒目,north,498

Current Behavior

[
{
"商品名称": "可乐",
"total_sales": 1027
},
{
"商品名称": "雪碧",
"total_sales": 28
},
{
"商品名称": "芬达",
"total_sales": 1679
}
]

Expected Behavior

dataset sort by total_sales

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

optimize patch pipelines

response of LLM need to be patched. We can divide this prgress into pipelines to make it more clear and improve maintainability

missing time field in sql in data aggregation

model:skylark-2-pro
sql: "SELECT city, SUM(sales) AS total_sales FROM VMind_data_source GROUP BY city",
user prompt: 按时间看杭州销量
fieldInfo:[
{
"fieldName": "key",
"type": "int",
"role": "measure",
"domain": [
0,
499
]
},
{
"fieldName": "id",
"type": "int",
"role": "measure",
"domain": [
1,
502
]
},
{
"fieldName": "order_id",
"type": "date",
"role": "dimension",
"domain": [
"US-2019-1357144",
"CN-2019-1973789",
"US-2019-3017568",
"CN-2018-2975416",
"CN-2017-4497736",
"CN-2016-4195213",
"CN-2019-5801711",
"CN-2017-2752724",
"US-2018-2511714",
"CN-2019-5631342",
"US-2018-4150614",
"CN-2019-4364300",
"CN-2019-3230180",
"US-2018-1966627",
"CN-2018-1190387",
"CN-2018-3216455",
"CN-2018-4690757",
"CN-2018-4674220",
"US-2018-3857264",
"CN-2018-4054371"
]
},
{
"fieldName": "order_date",
"type": "string",
"role": "dimension",
"domain": [
"2019/4/27",
"2019/6/15",
"2019/6/16",
"2019/12/9",
"2018/5/31",
"2017/10/27",
"2016/12/22",
"2019/6/1",
"2017/6/5",
"2018/11/22",
"2019/10/2",
"2019/10/3",
"2018/6/7",
"2019/12/12",
"2019/9/28",
"2018/11/19",
"2018/2/28",
"2018/9/3",
"2018/9/17",
"2018/7/2"
]
},
{
"fieldName": "delivery_date",
"type": "string",
"role": "dimension",
"domain": [
"2019/4/29",
"2019/6/16",
"2019/6/19",
"2019/12/10",
"2018/6/2",
"2017/10/31",
"2016/12/24",
"2019/6/6",
"2017/6/9",
"2018/11/25",
"2019/10/3",
"2019/10/4",
"2019/10/5",
"2018/6/14",
"2019/12/15",
"2019/10/2",
"2018/11/23",
"2018/3/1",
"2018/9/6",
"2018/9/21"
]
},
{
"fieldName": "delivery_method",
"type": "string",
"role": "dimension",
"domain": [
"二级",
"标准级",
"一级",
"当日"
]
},
{
"fieldName": "customer_id",
"type": "date",
"role": "dimension",
"domain": [
"曾惠-14485",
"许安-10165",
"宋良-17170",
"万兰-15730",
"俞明-18325",
"谢雯-21700",
"康青-19585",
"赵婵-10885",
"刘斯-20965",
"白鹄-14050",
"贾彩-10600",
"马丽-15910",
"宋栋-12310",
"巩虢-13495",
"常松-20575",
"田黎-16450",
"谭乐-17815",
"徐岱-11875",
"武杰-14815",
"吕兰-15700"
]
},
{
"fieldName": "customer_name",
"type": "string",
"role": "dimension",
"domain": [
"曾惠",
"许安",
"宋良",
"万兰",
"俞明",
"谢雯",
"康青",
"赵婵",
"刘斯云",
"白鹄",
"贾彩",
"马丽",
"宋栋",
"巩虢",
"常松",
"田黎明",
"谭乐",
"徐岱",
"武杰",
"吕兰"
]
},
{
"fieldName": "customer_type",
"type": "string",
"role": "dimension",
"domain": [
"公司",
"消费者",
"小型企业"
]
},
{
"fieldName": "city",
"type": "string",
"role": "dimension",
"domain": [
"杭州",
"内江",
"镇江",
"汕头",
"景德镇",
"榆林",
"哈尔滨",
"青岛",
"徐州",
"上海",
"温岭",
"唐山",
"宁波",
"厦门",
"宿州",
"兰州",
"淮阴",
"肇源",
"南昌",
"合肥"
]
},
{
"fieldName": "province",
"type": "string",
"role": "dimension",
"domain": [
"浙江",
"四川",
"江苏",
"广东",
"江西",
"陕西",
"黑龙江",
"山东",
"上海",
"河北",
"福建",
"安徽",
"甘肃",
"吉林",
"辽宁",
"湖北",
"河南",
"湖南",
"北京",
"重庆"
]
},
{
"fieldName": "country_or_region",
"type": "string",
"role": "dimension",
"domain": [
"**"
]
},
{
"fieldName": "area",
"type": "string",
"role": "dimension",
"domain": [
"华东",
"西南",
"中南",
"西北",
"东北",
"华北"
]
},
{
"fieldName": "product_id",
"type": "date",
"role": "dimension",
"domain": [
"办公用-用品-10002717",
"办公用-信封-10004832",
"办公用-装订-10001505",
"办公用-用品-10003746",
"办公用-器具-10003452",
"技术-设备-10001640",
"办公用-装订-10001029",
"家具-椅子-10000578",
"办公用-纸张-10001629",
"办公用-系固-10004801",
"技术-设备-10000001",
"技术-复印-10002416",
"办公用-信封-10000017",
"技术-配件-10004920",
"技术-电话-10004349",
"办公用-器具-10003582",
"办公用-标签-10004648",
"技术-配件-10001200",
"办公用-用品-10000039",
"办公用-装订-10004589"
]
},
{
"fieldName": "product_type",
"type": "string",
"role": "dimension",
"domain": [
"办公用品",
"技术",
"家具"
]
},
{
"fieldName": "product_sub_type",
"type": "string",
"role": "dimension",
"domain": [
"用品",
"信封",
"装订机",
"器具",
"设备",
"椅子",
"纸张",
"系固件",
"复印机",
"配件",
"电话",
"标签",
"书架",
"用具",
"收纳具",
"美术",
"桌子"
]
},
{
"fieldName": "product_name",
"type": "string",
"role": "dimension",
"domain": [
"Fiskars 剪刀, 蓝色",
"GlobeWeis 搭扣信封, 红色",
"Cardinal 孔加固材料, 回收",
"Kleencut 开信刀, 工业",
"KitchenAid 搅拌机, 黑色",
"柯尼卡 打印机, 红色",
"Ibico 订书机, 实惠",
"SAFCO 扶手椅, 可调",
"Green Bar 计划信息表, 多色",
"Stockwell 橡皮筋, 整包",
"爱普生 计算器, 耐用",
"惠普 墨水, 红色",
"Jiffy 局间信封, 银色",
"SanDisk 键区, 可编程",
"诺基亚 充电器, 蓝色",
"KitchenAid 冰箱, 黑色",
"Novimex 圆形标签, 红色",
"Memorex 键盘, 实惠",
"Acme 尺子, 工业",
"Avery 孔加固材料, 耐用"
]
},
{
"fieldName": "sales",
"type": "float",
"role": "measure",
"domain": [
29.4,
35621.355
]
},
{
"fieldName": "amount",
"type": "int",
"role": "measure",
"domain": [
1,
14
]
},
{
"fieldName": "discount",
"type": "float",
"role": "measure",
"domain": [
0,
0.8
]
},
{
"fieldName": "profit",
"type": "float",
"role": "measure",
"domain": [
-4988.2,
7214.76
]
}
]

[Feature] add domain of dimensions in fieldInfo to make LLM use values from domain while generating SQL

What problem does this feature solve?

user must specify dimension value in their prompt, such as "帮我展示north区域排名前三的商品销售额" because LLM doesn't know dimension values when generating sql. If we add domain of dimensions in fieldInfo, user can use "帮我展示北方排名前三的商品销售额"

What does the proposed API look like?

[
{
"fieldName": "商品名称",
"type": "string",
"role": "dimension",
domain:['可乐', '雪碧', '芬达', '醒目']
},
{
"fieldName": "region",
"type": "string",
"role": "dimension",
domain:['north', 'south', 'west', 'east']
},
{
"fieldName": "销售额",
"type": "int",
"role": "measure"
}
]

[Bug] gif size error when export gif twice.

Version

1.2.4-alpha.5

Link to Minimal Reproduction

null

Steps to Reproduce

see feat/node-support branch.

Current Behavior

gif size error:
vmind-wordcloud-1707376254884

Expected Behavior

gif has the same size as jpg:
vmind-wordcloud-1707376254884

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

新增extractDataFromText API

新增一个API:VMind.extractDataFromText,从文本中提取json格式的数据,并生成可以用于绘图的指令。
示例:

const text="此前《金融时报》曾报道,2023年小红书营收达到37亿美元,净利润达到5亿美元,相比2022年收入20亿美元、亏损2亿美元,小红书不仅首次实现盈利,而且营收更是上了一个台阶。这很大程度得归功于广告业务多元化、高效率,以及电商业务带来的增量。"

const {data,instruction}=vmind.extractDataFromText(text,options)
console.log(data)
/*[{"name":"个护美妆","adRevenuePercentage":18},{"name":"时尚穿搭","adRevenuePercentage":12.5},{"name":"美食饮品","adRevenuePercentage":10},{"name":"家居家装","adRevenuePercentage":8.7},{"name":"母婴","adRevenuePercentage":7},{"name":"黄金珠宝","adRevenuePercentage":6},{"name":"汽车","adRevenuePercentage":5.3},{"name":"日化百货","adRevenuePercentage":5.1}]*/
console.log(instruction)
//请绘制一个饼图,展示小红书广告收入在各个行业中的占比

[Chart generation] 组合图生成

VMind图表智能生成模块接入组合图,使用同一份数据集,生成common chart,多个图表组合在一张图表中展示:

Image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.