Calling Blocks as "Functions" for OpenAI's new functions feature
![Calling Blocks as "Functions" for OpenAI's new functions feature](/content/images/size/w2000/2023/07/Fza1FdQWIAIcu4Xssssss.jpeg)
Teaser to the next release of Remix (hopefully this week, I fell behind).
OpenAI released a cool feature that can be used instead of super-prompting to coax a chat agent to send the proper data to be handled for functions. I was already doing this, but through a layer of text parsing - this streamlines things a bit (however, I will keep the old implementation, since other APIs in the future might not have this feature and I want to allow them to execute canvas functions as well).
![](https://www.rabbitremix.com/content/images/2023/07/Fza1AQDXwAEt5ADffffff-1.jpeg)
![](https://www.rabbitremix.com/content/images/2023/07/Fza1C27WIAIBcWg11111.jpeg)
Here is a quick video demo below, followed by a long form tweet where I lay out what is happening here step by step...
(forgive all the Tweet linking, Ghost only allows 100MB video uploads)
Using @OpenAI 's new 'functions' feature for adding powers to your canvas agents! Instead of calling fns, send those requests to a block targets - let them handle it inside that same flow. 🐇
— Ryan Robitaille (@ryrobes) June 23, 2023
Excited about this one. Release next week. pic.twitter.com/t05hreNoaP
..and the full explanation...
Kinda buried the lede here last night, I'll try and unroll.
— Ryan Robitaille (@ryrobes) June 24, 2023
- Make a flow that does something (like get the weather from an API w Python)
- Turn that flow into a "kit" or sub-flow by dragging it's parts into a kit container
- Dropdown select it's "face" block, it's "input"… https://t.co/b2aLi7iuMS pic.twitter.com/BNG9axqjkd