非编码人员注意:你可以在 instagraph.ai 注册候补名单。
你好,冒险的程序员!欢迎来到InstaGraph,这是你用于将文本或URL转换为有见地的知识图谱的首选应用程序。对复杂主题中实体之间的关系感到好奇?将文本馈送到InstaGraph,瞧!精美的知识图谱触手可及。
请参阅此处由InstaGraph生成的示例流程图。
由OpenAI的GPT-3.5提供支持,此Flask应用程序将你的文本转换为色彩鲜艳的图形,从而更轻松地可视化各种实体之间的关系。说得够多了,让我们开始吧!
作者的TL;DR:如果你只是在寻找知识图谱的生成方式,请查看占 main.py 一半的函数调用参数。
要开始使用,你需要安装 Python 和 pip。
git clone https://github.com/yoheinakajima/instagraph.git
cd instagraph
pip install -r requirements.txt
将 .env.example 更改为 .env
mv .env.example .env
Add your OpenAI API key to .env file:
OPENAI_API_KEY=your-api-key-here
OptionalAdd Neo4J username, password and URL in the
*.env
file as well.
NEO4J_USERNAME=
NEO4J_PASSWORD=
NEO4J_URL=
5. Run the Flask apppython main.py
Navigate to
http://localhost:8080
to see your app running.
Run as Container
1. Clone the repositorygit clone https://github.com/yoheinakajima/instagraph.git
2. Navigate to the project docker directorycd instagraph/docker
3.1 Run in Dev modedocker-compose -f docker-compose-dev.yml up # Add -d flag at the end to run in background/daemon mode.
3.2 Run in Prod - Create the docker image
gunicorn==21.2.0to run the application in production mode
docker-compose -f docker-compose.yml up --build -d
http://localhost:8080.
GET Response Data:
/get_response_data
POST
{"user_input": "Your text here"}
GET Graph Data:
/get_graph_data
POST
GET History Data:
/get_graph_history
GET
Best way to chat with me is on Twitter at @yoheinakajima. I usually only code on the weekends or at night, and in pretty small chunks. I have lots ideas on what I want to add here, but obviously this would move faster with everyone. Not sure I can manage Github well given my time constraints, so please reach out if you want to help me run the Github. Now, here are a few ideas on what I think we should add based on comments...
There are a lot of "build a chart" tools out there, so instead of doing user account and custom charts, it sounds more fun for me to work on building the largest knowledge graph ever...
Before creating an Issue please refer the ISSUE_TEMPLATE provided.
MIT License. See LICENSE for more information.
Enjoy using InstaGraph! 🎉