Ironclad / rivet

The open-source visual AI programming environment and TypeScript library
https://rivet.ironcladapp.com
MIT License
2.68k stars 234 forks source link

[Feature]: Make node methods async #443

Open ccollie opened 2 weeks ago

ccollie commented 2 weeks ago

Feature Request

In our product we have a list of standard prompts corresponding to an entity in our domain (call transcripts). These prompts are the output of a prompt engineering process and encompass the LLM provider, output format and other tweaks to customize the result for downstream consumers. The idea is that in the frontend, the user can simply add a Library Prompt node, and connect it to a source without caring about details.

In order for this to work, I want to have a dropdown menu which makes a call to our backend to get the list of prompts to select from. There seems to be no way to do this currently. The minimum seems to be to make getInputDefinitions (and possibly getOutputDefinitions and getUIData) async.

I think this addition would open the possibility of more advanced use cases.

Code of Conduct

ccollie commented 2 weeks ago

Thinking about it more, the most relevant method for my use-case would be getEditors

abrenneke commented 1 week ago

@ccollie getEditors totally can be async already to support this

ccollie commented 1 week ago

@ccollie getEditors totally can be async already to support this

Fantastic!. I was looking at specific node implementations rather than the Typescript definitions