From ba2da2f4edab3c56b63e639abbbf23f89afcecac Mon Sep 17 00:00:00 2001 From: "jinhui.li" Date: Mon, 3 Mar 2025 15:51:12 +0800 Subject: [PATCH] fix some bugs --- utils.mjs | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 utils.mjs 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; +}