LLM chat assistant in code flow canvas using OpenAI API
November 22, 2024
LLM chat assistant in code flow canvas using OpenAI API
In this video I show a code flow canvas flow that implements a chat assistant using the OpenAI chat completion API including streaming of the response and basic function calling.
If you want to try this out yourself, then you can do that on demo.codeflowcanvas.io. You need an OpenAI api key for this, which you can provide in the “key”-dialog which is in the sidemenu on the right. Your API-key is only stored in memory in the browser and only send to the OpenAI API’s directly from the browser.
You can also use tools like LMStudio (an application for running LLM models locally) which have a local server api that is compatible with the OpenAI chat completion api, you just need to change the url in the fetch node and enable CORS, athough I am having some troubles with this when running in chrome. In firefox it just works.
If you have any questions or feedback, feel free to reach out to me here: [email protected]