Coder Social home page Coder Social logo

dynamiclu / langchain-chatbi Goto Github PK

View Code? Open in Web Editor NEW
40.0 1.0 11.0 1.69 MB

一种利用Langchain框架和本地向量库实现的对话式BI,它的目标是帮助用户寻找、理解数据知识,并能够分析数据、洞察结果,通过自然语言对话,降低数据分析的门槛。

Python 100.00%
baichuan bge-large-en chatglm faiss langchain python3 qianwen text2vec rag

langchain-chatbi's Introduction

Langchain-ChatBI

介绍

READ THIS IN ENGLISH

一种利用 Langchain 框架和本地向量库实现的对话式BI,它的目标是帮助用户寻找、理解数据知识,并能够分析数据、洞察结果,通过自然语言对话,降低数据分析的门槛。

该项目可以实现本地化部署,可启动本地大模型(ChatGLM-6B ),也可用HTTP调用百川和通义千问大模型。本项目利用大模型的语言理解能力,识别用户的BI意图,利用指标匹配,解决对话式BI如何确保数据准确的难点。

部署

1. 环境配置

  • 确保你的机器安装了 Python 3.8 - 3.11
$ python3 --version
Python 3.10.0
# 拉取仓库
$ git clone https://github.com/dynamiclu/Langchain-ChatBI.git

# 进入目录
$ cd Langchain-ChatBI

# 安装全部依赖
$ pip3 install -r requirements.txt 

2. 模型下载

  • 向量模型
# bge-large-en-v1.5 下载
from modelscope import snapshot_download
model_dir = snapshot_download('AI-ModelScope/bge-large-en-v1.5')

#text2vec 下载
from modelscope import snapshot_download
model_dir = snapshot_download('Jerry0/text2vec-large-chinese')
  • 大模型
#chatglm2-6b-int4 下载
from modelscope import snapshot_download
model_dir = snapshot_download('ZhipuAI/chatglm2-6b-int4')

3. 启动Gradio

# 启动Gradio
$ python3 main_webui.py

4. 示例

langchain-chatbi's People

Contributors

dynamiclu avatar

Stargazers

 avatar  avatar 夏小龙 avatar  avatar  avatar  avatar  avatar Kerwin Wilson avatar  avatar  avatar  avatar Leslee avatar  avatar  avatar  avatar zxlweb avatar HL avatar  avatar Justin avatar Zhang Guowen avatar  avatar  avatar DX avatar wslsw avatar  avatar yao avatar  avatar 雪后西塘 avatar 罗亮 avatar  avatar Alex Chen avatar  avatar zhangucan avatar  avatar  avatar  avatar  avatar kevin avatar  avatar  avatar

Watchers

 avatar

langchain-chatbi's Issues

test demo

你好,请问一下这个里面的question_answer.txt是不是对格式有要求啊,而且你的示例数据是空的,根本就没有demo做测试啊

Message: 'knowledge/content/question_answer.txt 未能成功加载'

但实际上有正常安装:
import nltk from nltk.book import * *** Introductory Examples for the NLTK Book *** Loading text1, ..., text9 and sent1, ..., sent9 Type the name of the text or sentence to view it. Type: 'texts()' or 'sents()' to list the materials. text1: Moby Dick by Herman Melville 1851 text2: Sense and Sensibility by Jane Austen 1811 text3: The Book of Genesis text4: Inaugural Address Corpus text5: Chat Corpus text6: Monty Python and the Holy Grail text7: Wall Street Journal text8: Personals Corpus text9: The Man Who Was Thursday by G . K . Chesterton 1908

所以是怎么还回事呢?

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.