diff --git a/src/pages/api/gateway.ts b/src/pages/api/gateway.ts index f19c789..33c14c3 100644 --- a/src/pages/api/gateway.ts +++ b/src/pages/api/gateway.ts @@ -1,9 +1,13 @@ -import { createLobeChatPluginGateway } from '@lobehub/chat-plugins-gateway'; +import { createGatewayOnEdgeRuntime } from '@lobehub/chat-plugins-gateway'; + +export const config = { + runtime: 'edge', +}; export default async (req: Request) => { if (process.env.NODE_ENV === 'development') { - return createLobeChatPluginGateway()(req); + return createGatewayOnEdgeRuntime()(req); } - return; + return new Response('gateway'); };