-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AI Function Node Iteration #4073
Comments
DesignHaving been working on the 1st part (API) and I have stuck with Open AI. Using This lead me to the thought - what if we didnt have a 3rd full duplicate of the core function node but instead, made this available to FF based Node-RED instances via a plug in? The plugin, when called could return all of the elements required to simply generate a new function node for the canvas. Additionally, when the function node is already created in the workspace, we can still call the API via the plugin by adding a prompt in the monaco editor. Thoughts? |
So, from a UX perspective, two entry points:
It feels more intuitive and obvious to a user if it's an explicit text input available to use, rather than them having to write comment-based prompts for example |
Agree with the plugin direction, rather than another node. Coupling tightly with existing function node would be preferable |
@joepavitt Which tier of customer is this available to? |
Would be all - not sure why that was missed |
Just sharing some progress and a request for feedback Current operational state (rough n ready)Generating a function nodeGenerating a flowGenerating JavaScript while inside a functionNotesYou might wonder why there is a separate "Flow Builder" and "Function Node Builder"... The flow builder is more more suseptible to "halucinations" and gets thigs wrong very often Lastly the editor "Ask FlowFuse 🪄" uses something called a Code Lens (monaco feature) and calls to the same endpoint as the Function Node builder. This means we can do similar things like adjust the output count and add libs to the setup tab. Accessing these menu items (please vote which option)I could not decide (discussed with @joepavitt) how to surface these. we agreed i would post screenshots for comparison. Option 1 - front and center (not easy to miss)Option 2 - top level side menuOption 3 - added to an existing side sub menu (I chose "view", but it could be any)Other feedback would be great tooThe menu items, dialogs titles / descriptions of the feature are very much thown together. Some feedback and suggestions are welcome.
|
Future iteration though dump Via Monaco Editor...
Additional menu items:
|
Naming things... Taking suggestions for module/repository name for this plugin?: |
Given the hallucinations, lets keep the scope on the Function node for this iteration (so we can get it released this week) and do the flow builder for v2. Of the three options, I think Option 1 is probably the best to begin with to get this feature noticed. Burying it under the menu will make it hard to discover. The Code Lens piece looks really nice 👍🏻 For naming, I'd suggest Where can I see details of the rest api this uses? We need to make sure the security around it is appropriate. I presume this will work on the Device Agent as well? |
@knolleary I had written most of the below when your comment landed (so it may seem a bit mixed up.
Regarding integration with FF platform. currently, this plugin is under local development and uses an endpoint hosted in a Node-RED instance on FFC. This make iteration and improvement super quick. However, to implement this securely, currently, the endpoint is protected using a single token setup on the instance security settings. I cannot immediately think of a way to avoid having to bring this endpoint and API into the FF platform. Can I grab you for 5 mins to discuss a scalable and suitable direction for integration with FF core please?
It was not mentioned in scope and is a question I think you have just answered ;)
Yes, makes sense & I love it too (bonus).
I agree completely. will remove that menu item for 1st iteration.
Perfect. |
Summary of a discussion @Steve-Mcl and I had: For first iteration:
This will then allow us to enable this feature for FFC users. For self-hosted, in the first iteration, they will be able to provide their own OpenAI tokens in their Future iteration - provide a public API that self-hosted instances can access to enable this feature. The api request will include their license identifier which we can use to validate the request is a valid customer. Note - self-hosted on air-gapped networks will not be able to make use of this feature. |
Regarding: HTTP requests made by the nr-assistant plugin (from runtime -> AI API) In PoC, I simply used Node built-in fetch which works fine however we have some users stuck on node 14/16 (on devices?) and fetch is Node 18 min (and even then it is experimental until Node 21) I noted that nr-tools uses the nifty little There is also a super small (160kb installed) So I have decided to stick with got for the plugin for the first iteration but I am struggling to justify NOT going with v11 of Do we:
My gut says since the plugin runs in the Node-RED runtime we should match up with Node-RED & use |
Just to be accurate, nr-tools uses undici 5.x which supports older Node.js versions.
|
@Steve-Mcl we will need an issue on the helm repo to add the templated settings to the flowforge.yml file - this is what the cloudproject issue will then be able to make use of when we publish the release. |
@knolleary raised here: FlowFuse/helm#425 |
@Steve-Mcl can you drop you status update here when available please? |
following that, I will be finishing up device agent integration - but that is non blocking of the release for instances. |
Closing this out as it's now in production |
Should we reopen for device agent support or generate new issue Joe? |
@Steve-Mcl new issue that is specifically scoped to agent support |
Description
function-gpt
node.Build a newfunction-ai??
node that will run on all NR instances on FlowFuse Cloud (and maybe self-hosted if we can work out smooth way of deploying)Which customers would this be available to
All
Have you provided an initial effort estimate for this issue?
I have provided an initial effort estimate
The text was updated successfully, but these errors were encountered: