diff --git a/utils.mjs b/utils.mjs new file mode 100644 index 0000000..d94175e --- /dev/null +++ b/utils.mjs @@ -0,0 +1,9 @@ +import { HttpsProxyAgent } from "https-proxy-agent"; + +export function getOpenAICommonOptions() { + const options = {}; + if (process.env.PROXY_URL) { + options.httpAgent = new HttpsProxyAgent(process.env.PROXY_URL); + } + return options; +}