AI Skill Hub 强烈推荐:GPT可视化 是一款优质的AI工具。AI 综合评分 8.0 分,在同类工具中表现稳健。如果你正在寻找可靠的AI工具解决方案,这是一个值得深入了解的选择。
GPT可视化 是一款基于 TypeScript 开发的开源工具,专注于 AI、可视化、TypeScript 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
GPT可视化 是一款基于 TypeScript 开发的开源工具,专注于 AI、可视化、TypeScript 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:npm 全局安装 npm install -g gpt-vis # 方式二:npx 直接运行(无需安装) npx gpt-vis --help # 方式三:项目依赖安装 npm install gpt-vis # 方式四:从源码运行 git clone https://github.com/antvis/GPT-Vis cd GPT-Vis npm install npm start
# 命令行使用
gpt-vis --help
# 基本用法
gpt-vis [options] <input>
# Node.js 代码中使用
const gpt_vis = require('gpt-vis');
const result = await gpt_vis.run(options);
console.log(result);
# gpt-vis 配置说明 # 查看配置选项 gpt-vis --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export GPT_VIS_CONFIG="/path/to/config.yml"
<img src="https://gw.alipayobjects.com/zos/antfincdn/R8sN%24GNdh6/language.svg" width="18"> English | 简体中文
AI-native visualization library for the LLM era. Framework-agnostic, ready to use.
<p align="center"> <a href="https://gpt-vis.antv.vision" target="_blank">📖 Documentation</a> · <a href="https://gpt-vis.antv.vision/examples" target="_blank">🎨 Examples</a> · <a href="https://github.com/antvis/mcp-server-chart" target="_blank">🔌 MCP Server</a> · <a href="/skills/chart-visualization" target="_blank">🧩 Chart Skill</a> </p>
</div>
<br/>
npm install @antv/gpt-vis
import { GPTVis } from '@antv/gpt-vis';
const gptVis = new GPTVis({
container: 'container',
width: 600,
height: 400,
});
// Markdown-like visualization syntax
const visSyntax = `
vis line
data
- time 2020
value 100
- time 2021
value 120
- time 2022
value 150
`;
gptVis.render(visSyntax);
render() supports two input formats: vis syntax (ideal for LLM streaming) and JSON objects (ideal for programmatic use).
<details> <summary><strong>Vanilla JavaScript</strong></summary>
import { GPTVis } from '@antv/gpt-vis';
const gptVis = new GPTVis({ container: 'chart', width: 600, height: 400 });
gptVis.render(visSyntaxString);
</details>
<details> <summary><strong>React</strong></summary>
import { GPTVis } from '@antv/gpt-vis';
import { useEffect, useRef } from 'react';
function ChartComponent({ visSyntax }) {
const containerRef = useRef();
const gptVisRef = useRef();
useEffect(() => {
gptVisRef.current = new GPTVis({ container: containerRef.current, width: 600, height: 400 });
return () => gptVisRef.current?.destroy();
}, []);
useEffect(() => {
if (gptVisRef.current && visSyntax) {
gptVisRef.current.render(visSyntax);
}
}, [visSyntax]);
return <div ref={containerRef} />;
}
</details>
<details> <summary><strong>Vue</strong></summary>
<template>
<div ref="chartRef"></div>
</template>
<script setup>
import { ref, watch, onUnmounted } from 'vue';
import { GPTVis } from '@antv/gpt-vis';
const props = defineProps(['visSyntax']);
const chartRef = ref(null);
let gptVis = null;
watch(
() => props.visSyntax,
(syntax) => {
if (!gptVis) {
gptVis = new GPTVis({ container: chartRef.value, width: 600, height: 400 });
}
gptVis.render(syntax);
},
{ immediate: true },
);
onUnmounted(() => gptVis?.destroy());
</script>
</details>
<details> <summary><strong>Markdown Renderer (marked)</strong></summary>
GPT-Vis syntax naturally works with Markdown code fences and integrates with any Markdown renderer. The following example uses marked + marked-highlight — normal code blocks get syntax highlighting, while vis code blocks are rendered as interactive charts.
Install dependencies:
npm install @antv/gpt-vis marked marked-highlight highlight.js
Complete example:
import { Marked } from 'marked';
import { markedHighlight } from 'marked-highlight';
import hljs from 'highlight.js';
import { GPTVis } from '@antv/gpt-vis';
class GPTVisElement extends HTMLElement {
connectedCallback() {
const syntax = decodeURIComponent(this.dataset.syntax);
this._instance = new GPTVis({ container: this });
this._instance.render(syntax);
}
disconnectedCallback() {
this._instance?.destroy();
}
}
if (!customElements.get('gpt-vis')) {
customElements.define('gpt-vis', GPTVisElement);
}
const marked = new Marked(
markedHighlight({
langPrefix: 'hljs language-',
highlight(code, lang) {
if (lang?.startsWith('vis')) return code;
const language = hljs.getLanguage(lang) ? lang : 'plaintext';
return hljs.highlight(code, { language }).value;
},
}),
{
renderer: {
code({ text, lang }) {
if (lang?.startsWith('vis')) {
const syntax = encodeURIComponent(lang + '\n' + text);
return `<gpt-vis data-syntax="${syntax}" style="min-height:300px"></gpt-vis>`;
}
return false;
},
},
},
);
const markdown = `# My Report
\`\`\`vis bar
data
- category Python
value 28.1
- category JavaScript
value 18.5
- category Java
value 15.6
- category "C/C++"
value 12.3
title 2024 Programming Language Popularity
\`\`\`
`;
document.getElementById('content').innerHTML = marked.parse(markdown);
</details>
The universal GPTVis component accepts vis syntax strings or config objects for all 26 chart types:
npx shadcn@latest add https://gpt-vis.antv.vision/r/gpt-vis.json
import { GPTVis } from '@/components/ui/gpt-vis';
<GPTVis
content="vis line
data
- time 2020
value 100
- time 2021
value 120
- time 2022
value 150
title Sales Trend"
theme="academy"
/>;
Each chart type has its own component with a typed config prop — JSON only, chart-specific TypeScript validation:
npx shadcn@latest add https://gpt-vis.antv.vision/r/line.json
import { Line } from '@/components/ui/line';
<Line
config={{
data: [
{ time: '2020', value: 100 },
{ time: '2021', value: 120 },
{ time: '2022', value: 150 },
],
title: 'Sales Trend',
axisXTitle: 'Year',
}}
height={400}
/>;
All 26 chart types are available. Install any by name:
```bash npx shadcn@latest add https://gpt-vis.antv.vision/r/pie.json npx shadcn@latest add https://gpt-vis.antv.vision/r/bar.json npx shadcn@latest add https://gpt-vis.antv.vision/r/mindmap.json
高质量的AI可视化工具,支持多种图表和LLM
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
总体来看,GPT可视化 是一款质量优秀的AI工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | GPT-Vis |
| 原始描述 | 开源AI工具:🤖 GPT Vision, Visualization for AI Friendly! AntV's entry for AI, and 100% gene。⭐736 · TypeScript |
| Topics | AI可视化TypeScript |
| GitHub | https://github.com/antvis/GPT-Vis |
| License | MIT |
| 语言 | TypeScript |
收录时间:2026-05-27 · 更新时间:2026-05-27 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。