mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-01-30 23:26:36 +08:00
Fix: Memory-related bug fixes (#12226)
### What problem does this PR solve? Fix: bugs fix - table -> Table - memory delete fail - memory copywriting modified ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -39,7 +39,7 @@ export default function MemoryMessage() {
|
||||
messages={data?.messages?.message_list ?? []}
|
||||
pagination={pagination}
|
||||
setPagination={setPagination}
|
||||
total={data?.messages?.total ?? 0}
|
||||
total={data?.messages?.total_count ?? 0}
|
||||
// rowSelection={rowSelection}
|
||||
// setRowSelection={setRowSelection}
|
||||
// loading={loading}
|
||||
|
||||
@ -14,7 +14,7 @@ export interface IMessageInfo {
|
||||
}
|
||||
|
||||
export interface IMessageTableProps {
|
||||
messages: { message_list: Array<IMessageInfo>; total: number };
|
||||
messages: { message_list: Array<IMessageInfo>; total_count: number };
|
||||
storage_type: string;
|
||||
}
|
||||
|
||||
|
||||
@ -252,6 +252,7 @@ export function MemoryTable({
|
||||
open={showDeleteDialog}
|
||||
onOpenChange={setShowDeleteDialog}
|
||||
content={{
|
||||
title: t('memory.messages.forgetMessageTip'),
|
||||
node: (
|
||||
<ConfirmDeleteDialogNode
|
||||
// avatar={{ avatar: selectedMessage.avatar, name: selectedMessage.name }}
|
||||
|
||||
@ -80,8 +80,8 @@ export const AdvancedSettingsForm = () => {
|
||||
horizontal: true,
|
||||
placeholder: t('memory.config.storageTypePlaceholder'),
|
||||
options: [
|
||||
{ label: 'table', value: 'table' },
|
||||
// { label: 'graph', value: 'graph' },
|
||||
{ label: 'Table', value: 'table' },
|
||||
// { label: 'Graph', value: 'graph' },
|
||||
],
|
||||
required: false,
|
||||
}}
|
||||
@ -95,7 +95,7 @@ export const AdvancedSettingsForm = () => {
|
||||
// placeholder: t('memory.config.storageTypePlaceholder'),
|
||||
options: [
|
||||
// { label: 'LRU', value: 'LRU' },
|
||||
{ label: 'FIFO', value: 'FIFO' },
|
||||
{ label: 'FIFO', value: 'fifo' },
|
||||
],
|
||||
required: false,
|
||||
}}
|
||||
|
||||
@ -4,6 +4,7 @@ import { EmbeddingSelect } from '@/pages/dataset/dataset-setting/configuration/c
|
||||
import { MemoryType } from '@/pages/memories/constants';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { z } from 'zod';
|
||||
import { useFetchMemoryMessageList } from '../memory-message/hook';
|
||||
|
||||
export const memoryModelFormSchema = {
|
||||
embd_id: z.string(),
|
||||
@ -20,6 +21,7 @@ export const defaultMemoryModelForm = {
|
||||
export const MemoryModelForm = () => {
|
||||
const { modelOptions } = useModelOptions();
|
||||
const { t } = useTranslation();
|
||||
const { data } = useFetchMemoryMessageList();
|
||||
return (
|
||||
<>
|
||||
<RenderField
|
||||
@ -33,7 +35,11 @@ export const MemoryModelForm = () => {
|
||||
type: FormFieldType.Custom,
|
||||
disabled: true,
|
||||
render: (field) => (
|
||||
<EmbeddingSelect field={field} isEdit={false} disabled={true} />
|
||||
<EmbeddingSelect
|
||||
field={field}
|
||||
isEdit={false}
|
||||
disabled={data?.messages?.total_count > 0}
|
||||
/>
|
||||
),
|
||||
|
||||
tooltip: t('memories.embeddingModelTooltip'),
|
||||
@ -47,6 +53,7 @@ export const MemoryModelForm = () => {
|
||||
required: true,
|
||||
horizontal: true,
|
||||
type: FormFieldType.Select,
|
||||
disabled: data?.messages?.total_count > 0,
|
||||
options: modelOptions as { value: string; label: string }[],
|
||||
tooltip: t('memories.llmTooltip'),
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user