mirror of
https://github.com/wassname/chatGPTBox.git
synced 2026-08-02 12:30:35 +08:00
fix: crypto undefined on some websites, leading to session creation failure (#231)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Models } from '../config/index.mjs'
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
|
||||
/**
|
||||
* @typedef {object} Session
|
||||
@@ -43,7 +44,7 @@ export function initSession({
|
||||
conversationRecords,
|
||||
|
||||
sessionName,
|
||||
sessionId: crypto.randomUUID(),
|
||||
sessionId: uuidv4(),
|
||||
|
||||
aiName: modelName ? Models[modelName].desc : null,
|
||||
modelName,
|
||||
|
||||
Reference in New Issue
Block a user