mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-24 07:26:47 +08:00
### What problem does this PR solve? Fix: Document Previewer is not working #9606 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import { useSetModalState } from '@/hooks/common-hooks';
|
||||
import { useSetDialog } from '@/hooks/use-chat-request';
|
||||
import { useFetchTenantInfo } from '@/hooks/use-user-setting-request';
|
||||
import { IDialog } from '@/interfaces/database/chat';
|
||||
import { isEmpty, omit } from 'lodash';
|
||||
import { useCallback, useMemo, useState } from 'react';
|
||||
@ -14,6 +15,7 @@ export const useRenameChat = () => {
|
||||
} = useSetModalState();
|
||||
const { setDialog, loading } = useSetDialog();
|
||||
const { t } = useTranslation();
|
||||
const tenantInfo = useFetchTenantInfo();
|
||||
|
||||
const InitialData = useMemo(
|
||||
() => ({
|
||||
@ -32,13 +34,13 @@ export const useRenameChat = () => {
|
||||
reasoning: false,
|
||||
parameters: [{ key: 'knowledge', optional: false }],
|
||||
},
|
||||
llm_id: '',
|
||||
llm_id: tenantInfo.data.llm_id,
|
||||
llm_setting: {},
|
||||
similarity_threshold: 0.2,
|
||||
vector_similarity_weight: 0.30000000000000004,
|
||||
top_n: 8,
|
||||
}),
|
||||
[t],
|
||||
[t, tenantInfo.data.llm_id],
|
||||
);
|
||||
|
||||
const onChatRenameOk = useCallback(
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import showMessage from '@/components/ui/message';
|
||||
import { MessageType } from '@/constants/chat';
|
||||
import {
|
||||
useHandleMessageInputChange,
|
||||
@ -159,7 +160,7 @@ export function useSendMultipleChatMessage(
|
||||
if (res && (res?.response.status !== 200 || res?.data?.code !== 0)) {
|
||||
// cancel loading
|
||||
setValue(message.content);
|
||||
console.info('removeLatestMessage111');
|
||||
showMessage.error(res.data.message);
|
||||
removeLatestMessage(chatBoxId);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user