mirror of
https://github.com/langgenius/webapp-conversation.git
synced 2025-12-08 17:32:27 +08:00
fix: v4 undefined problem
This commit is contained in:
@ -1,12 +1,12 @@
|
||||
import { type NextRequest } from 'next/server'
|
||||
import { APP_ID, API_KEY } from '@/config'
|
||||
import { ChatClient } from 'langgenius-client'
|
||||
import uuid from 'uuid'
|
||||
import { v4 } from 'uuid'
|
||||
|
||||
const userPrefix = `user_${APP_ID}:`;
|
||||
|
||||
export const getInfo = (request: NextRequest) => {
|
||||
const sessionId = request.cookies.get('session_id')?.value || uuid.v4();
|
||||
const sessionId = request.cookies.get('session_id')?.value || v4();
|
||||
const user = userPrefix + sessionId;
|
||||
return {
|
||||
sessionId,
|
||||
|
||||
Reference in New Issue
Block a user