Using Azure OpenAI JavaScript Client Library

I tried to use Azure OpenAI JavaScript Client Library (Azure OpenAI client library for JavaScript | Microsoft Learn) on Forge but this library uses some Node.js modules like net and tty that are not supported by Forge runtime.
Is there any workaround how this Client Library could be used?

You will likely need to talk to the endpoints directly for now but there is a native runtime in EAP. It might work with the library

Another problem you will run into is the 25 second time limit on forge functions. OpenAI calls I’m doing for a non-forge project take around 10-40 seconds each. Most of them are above or very close to 25 seconds.


Unfortunately native runtime is not yet available for the production (and I need the production env to be able to distribute the app to interested users).

And yes, currently looking into Async Events to solve the 25s limit.