mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-06 19:38:36 +08:00
Fix: Recall Test Page Metadata Not Displaying. (#14297)
### What problem does this PR solve? Fix: Recall Test Page Metadata Not Displaying. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@@ -33,6 +33,7 @@ import {
|
||||
import { Textarea } from '@/components/ui/textarea';
|
||||
import { UseKnowledgeGraphFormField } from '@/components/use-knowledge-graph-item';
|
||||
import { useTestRetrieval } from '@/hooks/use-knowledge-request';
|
||||
import { ITestRetrievalRequestBody } from '@/interfaces/request/knowledge';
|
||||
import { trim } from 'lodash';
|
||||
import { Send } from 'lucide-react';
|
||||
import { useEffect } from 'react';
|
||||
@@ -61,7 +62,7 @@ export default function TestingForm({
|
||||
...vectorSimilarityWeightSchema,
|
||||
...topKSchema,
|
||||
use_kg: z.boolean().optional(),
|
||||
kb_ids: z.array(z.string()).optional(),
|
||||
dataset_ids: z.array(z.string()).optional(),
|
||||
...MetadataFilterSchema,
|
||||
});
|
||||
|
||||
@@ -72,7 +73,7 @@ export default function TestingForm({
|
||||
...initialVectorSimilarityWeightValue,
|
||||
...initialTopKValue,
|
||||
use_kg: false,
|
||||
kb_ids: [knowledgeBaseId],
|
||||
dataset_ids: [knowledgeBaseId],
|
||||
},
|
||||
});
|
||||
|
||||
@@ -81,7 +82,7 @@ export default function TestingForm({
|
||||
const values = useWatch({ control: form.control });
|
||||
|
||||
useEffect(() => {
|
||||
setValues(values as Required<z.infer<typeof formSchema>>);
|
||||
setValues(values as ITestRetrievalRequestBody);
|
||||
}, [setValues, values]);
|
||||
|
||||
function onSubmit() {
|
||||
|
||||
Reference in New Issue
Block a user