GithubHelp home page GithubHelp logo

varunshenoy / graphgpt Goto Github PK

View Code? Open in Web Editor NEW
4.2K 4.2K 380.0 3.48 MB

Extrapolating knowledge graphs from unstructured text using GPT-3 🕵️‍♂️

Home Page: https://graphgpt.vercel.app

License: MIT License

HTML 11.24% CSS 19.91% JavaScript 68.85%
gpt-3 knowledge-graph

graphgpt's People

Contributors

katsi avatar ramonwenger avatar varunshenoy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

graphgpt's Issues

npm run start error

I get this when I try to start the app and reinstalling "debug" doesn't fix it.

node:internal/modules/cjs/loader:361
throw err;
^

Error: Cannot find module '/GraphGPT/node_modules/finalhandler/node_modules/debug/src/index.js'. Please verify that the package.json has a valid "main" entry
at tryPackage (node:internal/modules/cjs/loader:353:19)
at Function.Module._findPath (node:internal/modules/cjs/loader:566:18)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (//GraphGPT/node_modules/finalhandler/index.js:14:13)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32) {
code: 'MODULE_NOT_FOUND',
path: '/GraphGPT/node_modules/finalhandler/node_modules/debug/package.json',
requestPath: 'debug'
}

GraphGPT key is not working

I install graphGPT and run the application. When I include my new API key from OpenAI which I have never used it generate an error when I try to generate a graph from the promt.

errorGraphGPT

How can I solved it, I want to try first this app.

Using Azure OpenAI API

Hi there,
Thanks for the great project, I want to use Azure OpenAI API instead of OpenAI, but I don't know where I can modify it (Keys,..)
Thank you.

Graph GPT Capabilities

Hello! I am new to hithub and this space, but found graph GPT and have several questions! I am looking to create a knowledge graph based on a large body of text, a medium-sized text book. I see the current UI takes in shorter utterances. What is the best way to go about graphing out larger body of text? IS this something graph gpt can help with?

Thank you!

Error in npm install

Hi,

I am getting the following error when trying to do npm install, can you please help me how to resolve it:

npm ERR! Linux 3.10.0-1160.42.2.el7.x86_64
npm ERR! argv "/root/miniconda3/bin/node" "/root/miniconda3/bin/npm" "install"
npm ERR! node v6.13.1
npm ERR! npm v3.10.10
npm ERR! path /home/GraphGPT/node_modules/.staging/@types/aria-query-dc336710/package.json
npm ERR! code ENOTDIR
npm ERR! errno -20
npm ERR! syscall open

npm ERR! ENOTDIR: not a directory, open '/home/GraphGPT/node_modules/.staging/@types/aria-query-dc336710/package.json'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request:
npm ERR! /home/GraphGPT/npm-debug.log

Manual Input react-graph-vis

As GraphGPT works like make a request to GPT 3

Given a prompt, extrapolate as many relationships as possible from it and provide a list of updates.

If an update is a relationship, provide [ENTITY 1, RELATIONSHIP, ENTITY 2]. The relationship is directed, so the order matters.

If an update is related to a color, provide [ENTITY, COLOR]. Color is in hex format.

If an update is related to deleting an entity, provide ["DELETE", ENTITY].

Example:
prompt: Alice is Bob's roommate. Make her node green.
updates:
[["Alice", "roommate", "Bob"], ["Alice", "#00FF00"]]

prompt:

I can also get the response from other model like ChatGPT/GPT 3. So, is there anyway that allows me put the response like,

[["知识", "包括", "科学定律"], ["知识", "包括", "科学模型"], ["科学定律", "指引", "未来的研究方向"], ["科学定律", "优化", "各种商业行为"], ["科学定律", "为基础", "先进的想法"], ["科学定律", "为人类社会创造价值"], ["科学模型", "描述", "事物规律"], ["科学模型", "给人们决策提供强有力支持"], ["科学模型", "避免了不科学导致的失败"], ["科学模型", "避免了资源浪费"], ["自然科学", "回答问题"], ["人文科学", "回答问题"], ["比较各类知识", "是否能给人类社会创造足够多价值"], ["价值", "是金钱"], ["价值", "是物质发展"], ["价值", "是减少的损失"]]

Into react-graph-vis, so, I can get the same graph anyhow?

No graph Generated for this input

I input this description but there was no graph generated?

"Python is an object oriented programming language.

Almost everything in Python is an object, with its properties and methods.

A Class is like an object constructor, or a "blueprint" for creating objects."

react-scripts: command not found

GraphGPT (main)$ npm run start

[email protected] start
react-scripts start

sh: react-scripts: command not found

I got this error above. I have updated and fix all version using npm command but it does not start....help

Not generating graph

Hello,

I installed everything, and the UI in the browser opens as expected. However, when I type my prompt and click 'Generate' nothing seems to happen. I've tried in different locations with different WiFi, so I don't think it's the WiFi connection. I've left it open for about fifteen minutes. Does anyone have any thoughts/recommendations? Thanks!

a way to modify results?

Hello,

is there a way to modify the results to make it more accurate after generating the results? And while the demonstration is great, is there video of more advanced use of this? Like I don't understand how keep adding ino creates more graphs and how to manage that effectively.

Consider adding licence

As the project has no licence, currently the code is all rights reserved by default meaning nobody else is allowed to use it. Consider adding an open source licence to make the project truly open source, if you would like to :)

npm run start cannot work

when I execute the order "npm run start", it shows as follow:
npm ERR! Missing script: "start"
npm ERR!
npm ERR! Did you mean one of these?
npm ERR! npm star # Mark your favorite packages
npm ERR! npm stars # View packages marked as favorites
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\41189\AppData\Local\npm-cache_logs\2023-02-21T07_21_19_030Z-debug-0.log

How can I solve this?

Deployed to Vercel

Hi, found this via HN -- cool project!

I wanted to play around with this over the next few days and didn't want to keep the build server running, so I deployed it* here:

https://graph-gpt.vercel.app/ (edit: now deleted, see new url in later comments)

I just wanted to create an issue to let you know that if you want to use this Vercel URL (for example as an official demo URL of this project), I'm happy to give it to you -- just let me know here!

* The only modification I made was to add a prompt that asks for the OpenAI API key and stores it in localStorage. I think the UI for that can definitely be improved, but I just wanted something that was usable without opening devtools for now.

Error at first start - npm run start fails

Hi,
following your setup instructions, when i run the command npm run start i get the following error:

> [email protected] start /mnt/c/Users/ldelmonte/Desktop/GraphGPT
> react-scripts start

/mnt/c/Users/ldelmonte/Desktop/GraphGPT/node_modules/eslint-webpack-plugin/node_modules/jest-worker/build/index.js:110
  _ending;
         ^

SyntaxError: Unexpected token ;
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/mnt/c/Users/ldelmonte/Desktop/GraphGPT/node_modules/eslint-webpack-plugin/dist/getESLint.js:9:5)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/lodm/.npm/_logs/2023-02-02T14_52_59_897Z-debug.log

Complete log is the following:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: /usr/share/npm/node_modules/npm-lifecycle/node-gyp-bin:/mnt/c/Users/ldelmonte/Desktop/GraphGPT/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/ffmpeg/bin:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files/dotnet/:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/Docker/Docker/resources/bin:/mnt/c/Users/ldelmonte/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/ldelmonte/AppData/Local/Programs/Microsoft VS Code/bin:/snap/bin
9 verbose lifecycle [email protected]~start: CWD: /mnt/c/Users/ldelmonte/Desktop/GraphGPT
10 silly lifecycle [email protected]~start: Args: [ '-c', 'react-scripts start' ]
11 silly lifecycle [email protected]~start: Returned: code: 1  signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:198:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:198:13)
13 verbose stack     at maybeClose (internal/child_process.js:982:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid [email protected]
15 verbose cwd /mnt/c/Users/ldelmonte/Desktop/GraphGPT
16 verbose Linux 5.15.79.1-microsoft-standard-WSL2
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "start"
18 verbose node v10.19.0
19 verbose npm  v6.14.4
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: `react-scripts start`
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Any clue on this?

Thanks

Exceeded quota?

Hello!

I encountered an odd response. When troubleshooting the js I get this error message, "You exceeded your current quota, please check your plan and billing details." I have updated my billing details with OpenAI. No dice. Before I go start trying to resolve this on their end, would there be any reason to think this is not related to my account with OpenAI and would be something else?

Curious if others have experienced similar issues.

All the best,
Owen

Serialize the knowledge graph

Hi, many thanks for ChatGPT. Is there any way of saving the generated graphs into a serialization format? (e.g. RDF Turtle, JSON-LD, others?). I could not find anything in the interface for doing this. Thanks!

Optimize prompt length

Currently a single request seems to use ~450 tokens on an OpenAI account, which is comprised of the prompt and the response, for example:

313 prompt + 146 completion = 459 tokens

This turns out to about 0.01$ per request.

Maybe there are ways to shorten the length of both the prompt and the response, to reduce the token usage a bit.

Wrong error message when having insufficient credits on OpenAI

Currently the alert window notifies the user with something along the lines of

Error: TypeError: t.choices is undefined. Please double-check your API key.

The actual error message from the API is

{
    "error": {
        "message": "You exceeded your current quota, please check your plan and billing details.",
        "type": "insufficient_quota",
        "param": null,
        "code": null
    }
}

Credits on OpenAI seem to expire after some time, so the API request fails without having a subscription.

QUESTION (not bug) please - which framework?

Dear friend,
thanks a lot for your very interesting project.

I am doing something similar as a learning experience but I'd like to invest in a robust frontend framework that will let me visualize graphs similar to the ones you show, with a lot of flexibility in node and edge attributes (labels, colors, thicknesses etc), graph layout (2D, 3D, force based, directed undirected etc) , node and edge interaction (query attributes, recenter graph etc).

What would you advise using? I am reading stuff about react, angular and vue but see there are many more.

I am mainly a python programmer and for this plotly/dash also is appealing but perhaps not strategic.

Thanks for sharing any insight.

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.