Stefan-neo
Stefan-neo8mo ago

OpenAI Function Calling with Windmill Actions

Hi, I'm setting up scripts that to make use of OpenAI's function calling API. At this time I'm defining all functions and their behavior in one single script, but was wondering if it would be possible to fetch and execute Windmill Actions (Scripts) within the TS script in which I'm using the OpenAI function calling API. This would open up a lot of possibilities to set up flows and automations that select from a variety of workspace actions relevant to my use-cases.
2 Replies
Tiago Serafim
Tiago Serafim8mo ago
Sure, you can use the official TS client https://www.windmill.dev/docs/advanced/clients/ts_client and call runWaitResultScriptByPath or call the Windmill API directly https://app.windmill.dev/openapi.html#/ . It's also possible to share common logic if everything you're doing in the same language https://www.windmill.dev/docs/advanced/sharing_common_logic#deno-or-bun-relative-imports-for-sharing-common-logic
TypeScript Client | Windmill
The TypeScript client for Windmill allows you to interact with the Windmill platform using TypeScript in Deno / Bun runtime. This client provides a set of functions and utilities to access Windmill resources and perform various operations.
Sharing Common Logic | Windmill
It is common to want to share common logic between your scripts. This can be done easily using relative imports in both Python and Deno.
Stefan-neo
Stefan-neo8mo ago
Sounds exciting, I'll try that out and let you know how it went, thanks!