Open chronic8000 opened 1 year ago
Getting a lot of different errors this is just one of them.
sorry for the late reply I was not anticipating usage yet. I just have the auto coder ready, it is on fire. I am on mac and cannot test it in windows. I had that issue also and doing a full rebuild solved it.
first do rm -rf node_modules
then npm install
then ./node_modules/.bin/electron-rebuild
the robotjs is not actually in use but it will be soon to physically act as an agent on your pc, supervised and/or auto. I don't believe in autoGPT but with user supervision, guidance and intervention it works very well. I am just at the point that it reads its own code and makes documentation. The only limit is the 25 messages per 3 hours of gpt4, otherwise the whole project would be documented already. Check the latest readme for what I mean. I hope you can get it up and running, otherwise I have binaries also for windows. You can build all binaries also with
npm run build
ps I added all info in the readme beginning, hopefully an improvement for a stable install, which is a challenge
OK that is great good work on the documentation. I tried however to get it working in WSL2 Ubuntu and natively on Windows. The issue seems to be in WSL2 with dbus:
The error message suggests that there is an issue connecting to the D-Bus system bus socket in your WSL2 environment. D-Bus is a system message bus that allows communication between different processes on the system.
Please note that using Electron in WSL2 might have limitations or unexpected behavior due to the differences in the underlying system architecture. It is recommended to develop and run Electron applications on a native Linux or Windows environment whenever possible.
I also tried it in Windows and can't get it to install because of all the dependencies. The commands I used to get it working on Ubuntu that should work on bare metal hardware are below in no paticular order I just copied them as I was using them. I got help from GPT4 on getting this as far as I did :)
sudo apt-get install libx11-dev sudo apt-get install libxtst-dev sudo apt-get install libxtst-dev sudo apt-get install libgtk2.0-0 sudo apt-get install libxss1 sudo apt-get install libgconf-2-4 sudo apt-get install libnss3 sudo apt-get install libasound2 sudo apt-get install libatk-bridge2.0-0 sudo apt-get install build-essential libxtst-dev libpng++-dev sudo apt-get install libgtk-3-0 sudo apt-get install libgbm1
npm install electron-is-dev rm -rf node_modules package-lock.json npm install
Are you running it on OSX did you say? Could you bootcamp get it running on Windows? I could get it running in a VMware virtual machine but I wanted GPU access (if it's even needed?). Be good to get this working.
(base) chronic@Nemesis:~/KITT-AI-Browser$ npm install dmg-license npm ERR! code EBADPLATFORM npm ERR! notsup Unsupported platform for iconv-corefoundation@1.1.7: wanted {"os":"darwin"} (current: {"os":"linux"}) npm ERR! notsup Valid os: darwin npm ERR! notsup Actual os: linux
npm ERR! A complete log of this run can be found in: /home/chronic/.npm/_logs/2023-05-02T11_41_40_237Z-debug-0.log (base) chronic@Nemesis:~/KITT-AI-Browser$
I was debugging getting npm run build to work and ended up with this when I tried to install one of the dependencies it needs.
Are you able to do a npm run build? I have all binaries on my pc. I can make a torrent link for them. The autoupdate should preferable work so that everybody is always on the latest version. If you want I can upload binaries to icloud and give you the links for windows and linux. I should be able to find linux and windows machines online. I used to work with nwjs but that was constantly crashing. I learned quite a lot about Electron in short time but I am by no means an Electron specialist. Yes I am on mac M1, usually mac is the hardest to install stuff on. Why are you installing npm install dmg-license? KITT does not need GPU since it encapsulated online services. I tried a couple of local running llms but at this point that is completely useless for what I want need it to do. I do want to train my own network. Actually I want KITT to do everything, with the current plugins it is at a tipping point of supervised autonomous self modification. As if you can change your DNA on the fly as a human being ;)
please update me if you have some progress with installing stuff and encounter new issues, I might have also had them. Great that you are putting effort in getting it up and running!
(base) chronic@Nemesis:~/KITT-AI-Browser$ npm run build
kitt@1.0.0 build electron-builder --win --mac --linux --x64 --arm64
• electron-builder version=24.3.0 os=5.15.90.1-microsoft-standard-WSL2 • loaded configuration file=package.json ("build" field) • writing effective config file=dist/builder-effective-config.yaml ⨯ Cannot find module 'dmg-license' Require stack:
That is as far as I have got it to go. I managed to get past npm install with the help of GPT but the npm run build resulted in the above error. I have bashed other bugs with getting npm run build working however before getting to this point. I think I already included everything I installed to get to this point but it looks like this is as far as I can go as this package requires a mac :( I could spin up my emulator but I am a PC guy it runs so awfully even on my machine I can't bring myself to do it :)
I was trying to get dmg-builder and dmg-license packages to install. Seemed like they were required to go futher.
ah ok that is so that you can build for mac, like I can build for win and lin also
Aha ok. Could you not upload the binaries as a release to github?
they are to big but I can maybe make it a complete empty node_modules and get it under 100mb. There is also a release section on github, not sure if the 100mb max also applies there.
they are to big but I can maybe make it a complete empty node_modules and get it under 100mb. There is also a release section on github, not sure if the 100mb max also applies there.
Not sure, if not just whack a magnet link here
I forgot something vital, I update the readme and added the remove package-lock.json.
rm -rf node_modules rm package-lock.json npm install ./node_modules/.bin/electron-rebuild
I will also try to remove the build stuff so that these issues are solved. I can pushed it to a test branch. You can try it too if you want, I removed and rebuild everything and it startsup ok. I am just now thinking I should do that in a conda env so that nothing is pre installed
{ "name": "KITT", "version": "1.0.0", "description": "Knight Industries Two Thousand", "main": "./back-end/main.js", "permissions": [ "audioCapture" ], "author": { "name": "KITT", "email": "your.email@example.com" }, "homepage": "https://your-project-homepage.com", "scripts": { "start": "electron back-end/main.js --inspect"
}, "dependencies": { "electron": "^23.2.4", "applescript": "^1.0.0", "electron-devtools-installer": "^3.2.0", "electron-is-dev": "^2.0.0", "electron-prompt": "^1.7.0", "electron-rebuild": "^3.2.9", "electron-store": "^8.1.0", "electron-updater": "^5.3.0", "jsdom": "^21.1.1", "mic": "^2.1.2", "node-pty": "^0.10.1", "openai": "^3.2.1", "robotjs": "^0.6.0", "stream-buffers": "^3.0.2", "wav": "^1.0.2" } }
hi, i did a little more cleaning. It installs and runs ok in a clean env don't forget to clean package-lock , hmm maybe I should just add a simple install and reset batch file
{ "name": "KITT", "version": "1.0.0", "description": "Knight Industries Two Thousand", "main": "./back-end/main.js", "permissions": [ "audioCapture" ], "author": { "name": "KITT", "email": "your.email@example.com" }, "homepage": "https://your-project-homepage.com", "scripts": { "start": "electron back-end/main.js --inspect" }, "dependencies": { "electron": "^23.2.4", "electron-devtools-installer": "^3.2.0", "electron-is-dev": "^2.0.0", "electron-prompt": "^1.7.0", "electron-rebuild": "^3.2.9", "electron-store": "^8.1.0", "electron-updater": "^5.3.0", "mic": "^2.1.2", "node-pty": "^0.10.1", "openai": "^3.2.1", "stream-buffers": "^3.0.2", "wav": "^1.0.2" } }
Does the EXE keep logs I can send you anywhere? I am getting a lot of errors here in Windows land.
Is it meant to come up with all this text at the start? I don't seem to be able to type anywhere either it's like the box loads of the bottom of the screen and I can't get to it.
When I run it in Ubuntu from cloning the github repo it seems to get further I have got a text box to type in but get this error when saying hi:
Me :
Broker :
Cannot read properties of undefined (reading 'send')
Me : Hi
It doesn't have any of the options at the top either looks pretty broken still but loads up at least now :) Getting further.
√ Rebuild Complete
E:\KITT-AI-Browser>npm install
up to date, audited 300 packages in 969ms
45 packages are looking for funding
run npm fund
for details
found 0 vulnerabilities
E:\KITT-AI-Browser>npm start
KITT@1.0.0 start electron back-end/main.js --inspect
Debugger listening on ws://127.0.0.1:9229/e640c324-7ba4-4cb2-8f09-a44826281df8
For help, see: https://nodejs.org/en/docs/inspector
main log no web window yet : web-contents-created
main log no web window yet : web-contents-created
[MAIN-LOG] ITT-AI-Browser\lib\shared.js:64 at initShared : init shared
Skip checkForUpdates because application is not packed and dev update config is not forced
[MAIN-LOG] ITT-AI-Browser\back-end\main.js:168 at initMainScript : try ./ipcMain.js
[MAIN-LOG] ITT-AI-Browser\back-end\ipcMain.js:10 at init : ipcMain init
checkForUpdatesAndNotify called, downloadPromise is null
[32268:0503/133953.877:ERROR:cache_util_win.cc(20)] Unable to move the cache: Access is denied. (0x5)
[32268:0503/133953.877:ERROR:cache_util_win.cc(20)] Unable to move the cache: Access is denied. (0x5)
[32268:0503/133953.885:ERROR:disk_cache.cc(205)] Unable to create cache
[32268:0503/133953.885:ERROR:gpu_disk_cache.cc(673)] Gpu Cache Creation failed: -2
[32268:0503/133953.886:ERROR:disk_cache.cc(205)] Unable to create cache
[32268:0503/133953.886:ERROR:gpu_disk_cache.cc(673)] Gpu Cache Creation failed: -2
[MAIN-LOG] ITT-AI-Browser\back-end\ipcMain.js:14 at IpcMainImpl.
E:\KITT-AI-Browser>npm start
KITT@1.0.0 start electron back-end/main.js --inspect
Debugger listening on ws://127.0.0.1:9229/f27717ad-04e4-484c-ab2f-8448cc40b4e6
For help, see: https://nodejs.org/en/docs/inspector
main log no web window yet : web-contents-created
main log no web window yet : web-contents-created
[MAIN-LOG] ITT-AI-Browser\lib\shared.js:64 at initShared : init shared
Skip checkForUpdates because application is not packed and dev update config is not forced
[MAIN-LOG] ITT-AI-Browser\back-end\main.js:168 at initMainScript : try ./ipcMain.js
[MAIN-LOG] ITT-AI-Browser\back-end\ipcMain.js:10 at init : ipcMain init
checkForUpdatesAndNotify called, downloadPromise is null
[4888:0503/134212.465:ERROR:cache_util_win.cc(20)] Unable to move the cache: Access is denied. (0x5)
[4888:0503/134212.465:ERROR:cache_util_win.cc(20)] Unable to move the cache: Access is denied. (0x5)
[4888:0503/134212.472:ERROR:disk_cache.cc(205)] Unable to create cache
[4888:0503/134212.472:ERROR:gpu_disk_cache.cc(673)] Gpu Cache Creation failed: -2
[4888:0503/134212.472:ERROR:disk_cache.cc(205)] Unable to create cache
[4888:0503/134212.473:ERROR:gpu_disk_cache.cc(673)] Gpu Cache Creation failed: -2
[MAIN-LOG] ITT-AI-Browser\back-end\ipcMain.js:14 at IpcMainImpl.
E:\KITT-AI-Browser>
Got it running again and got some error logs this time
On native Windows this time. I found out it won't run on WSL2 because DBUS kernel access doesn't exist in WSL2.
Hey that is more starting to look like it. There might be an issue with me renaming the repo to KITT-AI-Browser instead of just KITT. I will do a fresh git init and see what goes down.
When I run it in Ubuntu from cloning the github repo it seems to get further I have got a text box to type in but get this error when saying hi:
Me : Broker : Cannot read properties of undefined (reading 'send') Me : Hi
It doesn't have any of the options at the top either looks pretty broken still but loads up at least now :) Getting further.
There are no more options at the top,
it moved all to plugins, stt and tts are in the path when needed, like eg
»stt»gpt»tts would make both talk
I changed tts to the more realtime, and free, html5 tts. The browser can also do better stt than whisper even I noticed. Elevenlabs has much better voices but during development with all the cycles credits are gone quickly. For demo's it is great though and it could be like eg
»stt»gpt»11 would use elevenlabs
I am thinking that I can reuse all these instruction to learn KITT about the prompt path domain language. I added parameters like eg
»file . »feed from=1 to=5 »gpt will only send the first 5 16k chunks.
last thing I did yesterday was testing the bash plugin ok. When you want that gpt is allowed to try something 3 times you can do eg
will only return the result to you and
will return the result to gpt and when there is an error it will reply with a fix to you
for now you can manually define the amounts of attempts by doing
would give it 2 chances to make it work, I had it on automatic at errors but you do want to set some boundaries. I am thinking to control it with a parameter max like
btw I uploaded all binaries, it is quite a drag to upload it all. Most are under 100mb now so much is removed and can be hosted in the repo. KITT needs github contol and run the whole thing. With robotjs and html5 text from image I can probably give it kindof physical mouse and key control. It seems there is already some kind of neuralnetwork installed in the Chromium browser. I will make a video about how to deal with all the logging and debugging when the plugin cannot be found
yeah we have an issue here ~/git/KITT/front-end/plugin.js: 15 let dir = error.stack.split('\n') 16 dir = dir[dir.length - 1] 17: let part = '/KITT/plugins' 18 let index = dir.indexOf(part) 19 if (index == -1) {
~/git/KITT/lib/shared.js:
7 let last = parts.pop()
8
9: last = last.substring(last.indexOf('/KITT/') + 6)
10 last = last.substring(0, last.lastIndexOf(':'))
11 let ret = [last, parts.join(' '), ':'].join(' ')
~/git/KITT/plugins/elevenlabs/main.js:
I'am at this point not sure how the binaries deal with this but for npm it should fix that you have no active plugins. I think I understand better what you mean now with nothing showing, also not the plugin tabbar. My screen looks like this now when I startup. When you have it like that then you should be able to work with it. First time go into the webview to logon to your account at openAI, thereafter you can close the webview when you want.
Some debug info for my electron-rebuild I just done from a fresh clone.
C:\Users\chron\Script Work\KITT-AI-Browser>node_modules.bin\electron-rebuild.cmd
\ Searching dependency treeAttempting to build a module with a space in the path See https://github.com/nodejs/node-gyp/issues/65#issuecomment-368820565 for reasons why this may not work
C:\Users\chron\Script Work\KITT-AI-Browser>
Results of npm start, stuff disappears when I click on it.
C:\Users\chron\Script Work\KITT-AI-Browser>npm start
KITT@1.0.0 start electron back-end/main.js --inspect
Debugger listening on ws://127.0.0.1:9229/2cdeecd1-701f-4d29-86fa-9987f2c29f87
For help, see: https://nodejs.org/en/docs/inspector
main log no web window yet : web-contents-created
main log no web window yet : web-contents-created
[MAIN-LOG] KITT-AI-Browser\lib\shared.js:64 at initShared (C:\Users\chron\Script : init shared
Skip checkForUpdates because application is not packed and dev update config is not forced
[MAIN-LOG] KITT-AI-Browser\back-end\main.js:168 at initMainScript (C:\Users\chron\Script : try ./ipcMain.js
[MAIN-LOG] KITT-AI-Browser\back-end\ipcMain.js:10 at init (C:\Users\chron\Script : ipcMain init
checkForUpdatesAndNotify called, downloadPromise is null
[MAIN-LOG] KITT-AI-Browser\back-end\ipcMain.js:14 at IpcMainImpl.
ok I removed node-py, it is a leftover from the start with the first alpaca model. Maybe it is needed later but it seems to only be in the way now. I added a useGl false to the browserwindow init, and just pushed it
let mainWindow = new BrowserWindow({
width: 2000,
height: 1000,
webPreferences: {
nodeIntegration: false,
contextIsolation: false,
enableRemoteModule: false,
webviewTag: true,
useGL: false,
preload: path.join(__dirname, '../front-end/preload.js'),
},
});
Error: The module '\?\C:\Users\chron\KITT\node_modules\robotjs\build\Release\robotjs.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 108. This version of Node.js requires NODE_MODULE_VERSION 113. Please try re-compiling or re-installing the module (for instance, using
npm rebuild
ornpm install
).Do I just need a different version of node.js? I am using the latest version node-v18.16.0-x64.msi Should I be using an older version? If I can get this working I will knock up a tutorial on setting it up.