八二年的矿泉水

Results 4 comments of 八二年的矿泉水

> > ```js > > const { GoogleGenerativeAI } = require("@google/generative-ai"); > > > > // Access your API key as an environment variable (see "Set up your API key"...

> @xuzhiyang @lzghades There are a lot of programs that **do not use the system proxy** (such as node fetch). In such cases, you need to use [tun mode](https://docs.gtk.pw/contents/tun.html) or...

> what do you mean by `enabling the tun mode in the terminal once`? i feel you did not enable it at all. anyway i am confident that's the solution...

> 楼主问题还没解决?下面是**解决方法** **google api:** `const { setGlobalDispatcher, ProxyAgent } = require("undici");` `const dispatcher = new ProxyAgent({ uri: new URL(process.env.https_proxy).toString() });` `//全局fetch调用启用代理` `setGlobalDispatcher(dispatcher);` > > **随便跟你说下openai的** `const { HttpsProxyAgent } =...