Giter VIP home page Giter VIP logo

chatbi's Introduction

ChatBI

中文 | English

ChatBI 是一个通过跟 AI 聊天来进行 BI 分析的系统。

原理分析参考文章:ChatGPT助力可视化方案探索

演示

ava vega

准备

1. 注册 OpenAI 账号

注册 OpenAI 账号,获取 API Key

2. 安装 Node.js 环境

参考:https://nodejs.org/en/learn/getting-started/how-to-install-nodejs

项目使用了 Node.js 中原生 fetch 方法,所以需要 Node.js >= 18,参考:https://nodejs.org/dist/latest-v18.x/docs/api/globals.html#fetch

安装好 Node.js 之后,安装 pnpm:

npm install -g pnpm

3. 服务端配置

进入 server 目录,复制 .env.example.env 并填写环境变量,如下:

# Database
OPENAI_API_BASE_URL=https://api.openai.com
OPENAI_API_KEY=xxx

# MySQL
DB_CONNECTION=mysql://test:[email protected]:3306/test

安装服务端依赖:

pnpm install

4. 安装依赖

在项目根目录执行:

pnpm install

5. 启动数据库 (可选)

为了本地开发演示,可以通过 docker 启动 MySQL:

cd ./server/docker && docker-compose up -d

6. 运行

  1. 启动服务端:
$ pnpm run dev:server
  1. 启动客户端:
$ pnpm run dev:client

chatbi's People

Contributors

yugasun avatar

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.