mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-18 01:10:14 +01:00
Remove crypto from client side
Unless, if we tries to access the client side page from http protocol, crypto.randomUUID() isn't available.
This commit is contained in:
parent
0af8f6a699
commit
0405206438
1 changed files with 2 additions and 2 deletions
|
|
@ -27,7 +27,7 @@ const useMessageHandler = () => {
|
||||||
|
|
||||||
// this is not a real messageId, it is used as placeholder before real messageId returned
|
// this is not a real messageId, it is used as placeholder before real messageId returned
|
||||||
text = text.trim();
|
text = text.trim();
|
||||||
const fakeMessageId = crypto.randomUUID();
|
const fakeMessageId = '11111111-1111-1111-1111-111111111111';
|
||||||
const isCustomModel = model === 'chatgptCustom' || !initial[model];
|
const isCustomModel = model === 'chatgptCustom' || !initial[model];
|
||||||
const sender = model === 'chatgptCustom' ? chatGptLabel : model;
|
const sender = model === 'chatgptCustom' ? chatGptLabel : model;
|
||||||
parentMessageId = parentMessageId || latestMessage?.messageId || '00000000-0000-0000-0000-000000000000';
|
parentMessageId = parentMessageId || latestMessage?.messageId || '00000000-0000-0000-0000-000000000000';
|
||||||
|
|
@ -161,4 +161,4 @@ export default function handleSubmit({
|
||||||
});
|
});
|
||||||
|
|
||||||
events.stream();
|
events.stream();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue