Closed battosai30 closed 1 year ago
Thanks for raising the issue. It should definitelt work outside of FlowForge, we didn't want to gate keep!
Could I check, upon adding the node to the canvas, did you deploy first, before asking ChatGPT a question?
We have an issue at the moment where you need to deploy, once the node is added, but before tou written any code in the function node - see #13
I would expect it to show a much nicer error than this though!
I'm not using FlowForge, and I have the same issue.
Thanks for letting us know @oywino - are you using same Operating System and Browser combo as reported too?
Have you tried the steps I'd mentioned above?
Thanks for letting us know @oywino - are you using same Operating System and Browser combo as reported too?
Have you tried the steps I'd mentioned above?
NodeRed: 3.0.2 Docker container Chrome on Win 10
I have tried all the steps recommended.
Rgds Oywin
@Steve-Mcl can you think of anything we added that would have been Node-RED 3.1 specific? I know we used 3.1 when dev'ing. I can't think of anything obvious myself?
Will try this out for myself once I'm back at my desk on Tuesday.
Thanks both for the details.
No, can't think of anything specific to either FlowForge or 3.1-beta.
What does the error message common.notification.error actually mean in this context?
Rgds Oywin
It means that Steve and I forgot to put a proper error message in and that Node-RED is resorting to a default placeholder 😬
Do you see any errors reported in the Node-RED terminal/cmd line logs?
The error will be coming from: https://github.com/flowforge/node-red-function-gpt/blob/main/index.html#L635
Which means our API endpoint is returning at error other than 404 (Not Found) or 500 (Internal Server Error)
That's odd though, because our API is only configured to return 1 of those 2 error states when it fails:
https://github.com/flowforge/node-red-function-gpt/blob/main/index.js#L504
Hopefully something is being logged that helps us here. I'm doing this all from phone btw, will be at my laptop on Tuesday when I can investigate properly
I'm not sure where to find that/those logs. Please direct me.
When you run Node-RED from the command line, or within the Docker container, you should see the logs printed there as it starts up. Wherever you run the node-red
command from.
The docs for the Docker Container do mention that a terminal/command line window gets opened, where you see the "Started Flows...", etc.
That's where any errors should be getting logged to
In my case it's a "native" install, no Docker.
It's a Debian strech in LXC container (Proxmox OS). I upgraded it to Buster => same result
Default log level doesn't show anything. Debug level show this :
[warn] [function-gpt] Registered invalid property name 'functionExternalModules'. Properties for this node must start with 'functionGpt'
Deploy first doesn't change anything.
I observed that the notification pop up is very quick to show up, like it does not reach the step where HTTP request to Openai is done. Maybe a clue ?
I seem to have the same issue. OS: Rasbian64 bit NR: V3.0.1 (runs as a service) Browser: Chrome on Win10
I noted the error below on startup. Not sure if it's related.
9 May 15:41:34 - [warn] [function-gpt] Registered invalid property name 'functionExternalModules'. Properties for this node must start with 'functionGpt'
I did deploy the flow before attemting to use the ask GPT function
Nick
Update: I just tried it under win10 with NR3.0.2 and using edge as a browser and it worked fine. more research needed
Update: tested the chrome browser and works OK
Update: No error was reported to the console on the Pi - See picture
Thanks @manglemender - just to check you mentioned you tested the chrome browser and works OK
but the original browser you mentioned that you used was Chrome on Win10
- what changed?
So the error is being triggered by the RED.auth.needsPermission
middleware here, which is returning a 401. @Steve-Mcl we set it as:
RED.auth.needsPermission("function-gpt.write")
which on review back, doesn't look right, where would this value be set? Not sure why this would be working locally either, as I don't recall setting this ourselves?
This is venturing outside of my own Node-RED dev knowledge
Thanks @manglemender - just to check you mentioned you
tested the chrome browser and works OK
but the original browser you mentioned that you used wasChrome on Win10
- what changed?
@joepavitt Sorry if that wasn't clear through my updates. What I discovered was that the issue was not browser related. The node worked OK with NR running on a windows platform regardless of browser but it did not work with NR running on Raspbian OS (64)
Nick
I get both errors mentioned above; After installing the node via 'Manage Palette', I see this this in the debug panel...
..and trying to use the node, I see this;
I did deploy the node first. Same result after restarting Node-RED. No errors in NR log In the browser console I get;
(I'm not good at interpreting the error) but I believe that leads me to;
o = o("abort");
try {
r.send(i.hasContent && i.data || null)
} catch (e) {
if (o)
throw e
}
},
abort: function() {
o && o()
}
OS - Canonical-Ubuntu-22.04-aarch64-2023.02.15-0 Oracle cloud VM server Node-RED v3.0.2 node v18.15.0
Fyi, I have resolved this locally and will publish an update tomorrow.
Great! Can't wait to hear about it 🤗
Fyi, I have resolved this locally and will publish an update tomorrow.
Nothing came..... 😪
Fyi, I have resolved this locally and will publish an update tomorrow.
Nothing came..... 😪
I've had a busy day :)
however, if you look again...
I've had a busy day :) however, if you look again...
Look where?
@oywino Steve has opened a PR. I'll review today hopefully and if all is working, have it released later
We have just published v0.2.1 to the Node-RED library with a fix in for this, in addition to more verbose error logging. This may take half an hour or so to refresh in the "Palette" of Node-RED.
Upgraded aaaannnnnnddddddd ...... it works :)
Thank you !
Current Behavior
I've just installed this node on my own NodeRed instance, not FlowForge (maybe it's the problem ?)
API key + OrgID configured (Keys used in other services so sure they're valid) Model = code-davinci-002 or gpt-3.5-turbo
Click on "Ask ChatGPT" immediatly leads to a popup "common.notification.error"
Expected Behavior
No response
Steps To Reproduce
No response
Environment