File tree 2 files changed +0
-23
lines changed
src/app/(backend)/webapi/chat
2 files changed +0
-23
lines changed Original file line number Diff line number Diff line change 1
1
import { POST as UniverseRoute } from '../[provider]/route' ;
2
2
3
- // due to the Chinese region does not support accessing Google
4
- // we need to use proxy to access it
5
- // refs: https://github.com/google/generative-ai-js/issues/29#issuecomment-1866246513
6
- // if (process.env.HTTP_PROXY_URL) {
7
- // const { setGlobalDispatcher, ProxyAgent } = require('undici');
8
- //
9
- // console.log(process.env.HTTP_PROXY_URL)
10
- // setGlobalDispatcher(new ProxyAgent({ uri: process.env.HTTP_PROXY_URL }));
11
- // }
12
-
13
- // but undici only can be used in NodeJS
14
- // so if you want to use with proxy, you need comment the code below
15
3
export const runtime = 'edge' ;
16
4
17
5
export const preferredRegion = [
Original file line number Diff line number Diff line change 1
1
import { POST as UniverseRoute } from '../[provider]/route' ;
2
2
3
- // due to the Chinese region does not support accessing Google
4
- // we need to use proxy to access it
5
- // refs: https://github.com/google/generative-ai-js/issues/29#issuecomment-1866246513
6
- // if (process.env.HTTP_PROXY_URL) {
7
- // const { setGlobalDispatcher, ProxyAgent } = require('undici');
8
- //
9
- // setGlobalDispatcher(new ProxyAgent({ uri: process.env.HTTP_PROXY_URL }));
10
- // }
11
-
12
- // but undici only can be used in NodeJS
13
- // so if you want to use with proxy, you need comment the code below
14
3
export const runtime = 'edge' ;
15
4
16
5
// due to Gemini-1.5-pro is not available in Hong Kong, we need to set the preferred region to exclude "Hong Kong (hkg1)".
You can’t perform that action at this time.
0 commit comments