Giter Site home page Giter Site logo

chatkg's Introduction

frameworks license tasks model-type domain tags
PyTorch
Apache License 2.0
relation-extraction
InternLM-20b-chat
NLP
Fine-tune
Agent

ChatKG
Chat with & Build Your Knowledge Graph

English 中文

Introduction 📖

ChatKG is a LLM application and a intelligent agent based on InternLM and LangChain, devoted to the construction of personal knowledge graph.

  • Constructing Personal KG

    • Understand the meaning of the paragraph in the user's input or a textbook
    • Build a personal knowledge graph based on the information users provide
    • Visualize and display the knowledge graph
  • Chat with users

    • Answer questions based on the knowledge graph
    • Chat with users and answer questions based on the knowledge graph
    • Assist users in learning and understanding knowledge

Features 🌟

  • based on InternLM-20b-chat(Update to InternLM2 lately)
  • Multi-modal Chat with users
  • Highly customizable

Demo 🎥

demo is coming soon...

Developing Timeline ⏲️

  • [2024.7.12] The project is reactivated.
  • [2024.4.16] Due to the recent busy academic study, the development of this project has been suspended, and the restart time is unknown...
  • [2024.3.14] T2KG Dataset prepared, extracting fine-tuning start.
  • [2024.3.12] Start the project.

Quick Start 🚀

Firstly, configuration in file config.py can be modified according to your needs or local computer environment. The flexible configuration:

Parameter Type Default Value
LLM Model Path str huggingface repo id
Chat Function bool True
Knowledge Graph Cache str kg
Neo4j Bolt URL str bolt://localhost:7474/
Neo4j Username str neo4j
Neo4j Password str chatkg666

There are two ways to use ChatKG:

  • Try ChatKG on OpenXLab (in the future)

  • Run ChatKG on your local machine

Step 1: Clone the repository

git clone https://github.com/ZK-Jackie/ChatKG.git
cd ChatKG

Step 2: Install the dependencies

pip install -r requirements.txt

Step 3: Run the ChatKG

python app.py

Step 4: Open the browser and visit the following URL

http://localhost:7860/

Besides, it is worth mentioning that running ChatKG locally means you need to download and load the LLM model and the knowledge graph data.

The model and knowledge graph data is not included in the repository and running it locally requires a lot of hardware resources, here is the minimum hardware requirements:

  • GPU: 1/4 A100
  • CPU: 8-core
  • Memory: 16G
  • Disk: 30G

Structure 🏗️

tree
.
├─assets
├─chat
├─kg
└─rag

License 📜

This project is released under the Apache License 2.0. Please also adhere to the Licenses of models and datasets being used.

Contact 📧

If you have any questions, please contact me at EMAIL

Reference 📚

This project uses information from the following sources:

Acknowledgement 🙏

Special thanks to Shanghai Artificial Intelligence Laboratory for its support of this project.

chatkg's People

Contributors

zk-jackie avatar

Stargazers

Zelong Wang avatar  avatar

Watchers

 avatar

Forkers

rayjue

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.