mirror of
https://github.com/wassname/chatGPTBox.git
synced 2026-09-30 11:23:26 +08:00
fix: crypto undefined on some websites, leading to session creation failure (#231)
This commit is contained in:
1 parent
8af03398d5
commit
4fb5d735ea
6 files changed
+24
-9
No files matched your search
@@ -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