diff --git a/app/api/utils/common.ts b/app/api/utils/common.ts index 2330499..e276dfa 100644 --- a/app/api/utils/common.ts +++ b/app/api/utils/common.ts @@ -4,7 +4,6 @@ import { ChatClient } from 'langgenius-client' import uuid from 'uuid' const userPrefix = `user_${APP_ID}:`; -// const uuid = require('uuid') export const getInfo = (request: NextRequest) => { const sessionId = request.cookies.get('session_id')?.value || uuid.v4(); diff --git a/app/global.d.ts b/app/global.d.ts new file mode 100644 index 0000000..337e84b --- /dev/null +++ b/app/global.d.ts @@ -0,0 +1,2 @@ +declare module 'langgenius-client'; +declare module 'uuid'; diff --git a/tsconfig.json b/tsconfig.json index c3e0bca..668a47e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -31,6 +31,7 @@ }, "include": [ "next-env.d.ts", + "global.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", @@ -39,4 +40,4 @@ "exclude": [ "node_modules" ] -} +} \ No newline at end of file