frameworks | license | tasks | model-type | domain | tags | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
|
|
|
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
- based on InternLM-20b-chat(Update to InternLM2 lately)
- Multi-modal Chat with users
- Highly customizable
demo is coming soon...
- [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.
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
tree
.
├─assets
├─chat
├─kg
└─rag
This project is released under the Apache License 2.0. Please also adhere to the Licenses of models and datasets being used.
If you have any questions, please contact me at EMAIL
This project uses information from the following sources:
- XTuner: A Toolkit for Efficiently Fine-tuning LLM
- InternLM: A Multilingual Language Model with Progressively Enhanced Capabilities
- QAMedicalKG: 基于医疗知识图谱自动问答
- ollama_knowlage_graph: 使用 LLM,将任何文本语料库转化为知识图谱
- T2KG(pre-release)
- 书生大模型实战营
Special thanks to Shanghai Artificial Intelligence Laboratory for its support of this project.