mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 06:00:56 +02:00
Update useServerStream.ts
This commit is contained in:
parent
8ed04e496b
commit
875ce4b77e
1 changed files with 1 additions and 6 deletions
|
@ -3,7 +3,6 @@ import { useResetRecoilState, useSetRecoilState } from 'recoil';
|
|||
import { SSE, createPayload, tMessageSchema, tConversationSchema } from 'librechat-data-provider';
|
||||
import type { TResPlugin, TMessage, TConversation, TSubmission } from 'librechat-data-provider';
|
||||
import { useAuthContext } from '~/hooks/AuthContext';
|
||||
import useSpeechSynthesis from '../components/Messages/SpeechSynthesis';
|
||||
import store from '~/store';
|
||||
|
||||
type TResData = {
|
||||
|
@ -21,8 +20,7 @@ export default function useServerStream(submission: TSubmission | null) {
|
|||
const setConversation = useSetRecoilState(store.conversation);
|
||||
const resetLatestMessage = useResetRecoilState(store.latestMessage);
|
||||
const { token } = useAuthContext();
|
||||
const { synthesizeSpeech } = useSpeechSynthesis();
|
||||
|
||||
|
||||
const { refreshConversations } = store.useConversations();
|
||||
|
||||
const messageHandler = (data: string, submission: TSubmission) => {
|
||||
|
@ -228,9 +226,6 @@ export default function useServerStream(submission: TSubmission | null) {
|
|||
const { plugins } = data;
|
||||
finalHandler(data, { ...submission, plugins, message });
|
||||
console.log('final', data);
|
||||
if (data.responseMessage.text) {
|
||||
synthesizeSpeech(data.responseMessage.text);
|
||||
}
|
||||
}
|
||||
if (data.created) {
|
||||
message = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue