mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Fix (search): Search application list supports renaming function #3221 -Update the search application list page and add a renaming operation entry -Modify the search application details interface to support obtaining detailed information -Optimize search settings page layout and style ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -38,11 +38,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { useForm, useWatch } from 'react-hook-form';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { z } from 'zod';
|
||||
import {
|
||||
LlmModelType,
|
||||
ModelVariableType,
|
||||
settledModelVariableMap,
|
||||
} from '../dataset/dataset/constant';
|
||||
import { LlmModelType } from '../dataset/dataset/constant';
|
||||
import {
|
||||
ISearchAppDetailProps,
|
||||
IUpdateSearchProps,
|
||||
@ -143,21 +139,11 @@ const SearchSetting: React.FC<SearchSettingProps> = ({
|
||||
chat_id: '',
|
||||
llm_setting: {
|
||||
llm_id: llm_setting?.llm_id || '',
|
||||
parameter: llm_setting?.parameter || ModelVariableType.Improvise,
|
||||
temperature:
|
||||
llm_setting?.temperature ||
|
||||
settledModelVariableMap[ModelVariableType.Improvise].temperature,
|
||||
top_p:
|
||||
llm_setting?.top_p ||
|
||||
settledModelVariableMap[ModelVariableType.Improvise].top_p,
|
||||
frequency_penalty:
|
||||
llm_setting?.frequency_penalty ||
|
||||
settledModelVariableMap[ModelVariableType.Improvise]
|
||||
.frequency_penalty,
|
||||
presence_penalty:
|
||||
llm_setting?.presence_penalty ||
|
||||
settledModelVariableMap[ModelVariableType.Improvise]
|
||||
.presence_penalty,
|
||||
parameter: llm_setting?.parameter,
|
||||
temperature: llm_setting?.temperature,
|
||||
top_p: llm_setting?.top_p,
|
||||
frequency_penalty: llm_setting?.frequency_penalty,
|
||||
presence_penalty: llm_setting?.presence_penalty,
|
||||
temperatureEnabled: llm_setting?.temperature ? true : false,
|
||||
topPEnabled: llm_setting?.top_p ? true : false,
|
||||
presencePenaltyEnabled: llm_setting?.presence_penalty ? true : false,
|
||||
@ -261,8 +247,13 @@ const SearchSetting: React.FC<SearchSettingProps> = ({
|
||||
) => {
|
||||
try {
|
||||
const { search_config, ...other_formdata } = formData;
|
||||
const { llm_setting, vector_similarity_weight, ...other_config } =
|
||||
search_config;
|
||||
const {
|
||||
llm_setting,
|
||||
vector_similarity_weight,
|
||||
use_rerank,
|
||||
rerank_id,
|
||||
...other_config
|
||||
} = search_config;
|
||||
const llmSetting = {
|
||||
llm_id: llm_setting.llm_id,
|
||||
parameter: llm_setting.parameter,
|
||||
@ -289,6 +280,7 @@ const SearchSetting: React.FC<SearchSettingProps> = ({
|
||||
search_config: {
|
||||
...other_config,
|
||||
vector_similarity_weight: 1 - vector_similarity_weight,
|
||||
rerank_id: use_rerank ? rerank_id : '',
|
||||
llm_setting: { ...llmSetting },
|
||||
},
|
||||
tenant_id: systemSetting.tenant_id,
|
||||
@ -302,7 +294,7 @@ const SearchSetting: React.FC<SearchSettingProps> = ({
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
'text-text-primary border p-4 rounded-lg',
|
||||
'text-text-primary border p-4 pb-12 rounded-lg',
|
||||
{
|
||||
'animate-fade-in-right': open,
|
||||
'animate-fade-out-right': !open,
|
||||
@ -658,6 +650,7 @@ const SearchSetting: React.FC<SearchSettingProps> = ({
|
||||
</FormItem>
|
||||
)}
|
||||
/> */}
|
||||
|
||||
<FormField
|
||||
control={formMethods.control}
|
||||
name="search_config.related_search"
|
||||
@ -690,7 +683,7 @@ const SearchSetting: React.FC<SearchSettingProps> = ({
|
||||
/>
|
||||
{/* Submit Button */}
|
||||
<div className="flex justify-end"></div>
|
||||
<div className="flex justify-end gap-2">
|
||||
<div className="flex justify-end gap-2 absolute bottom-1 right-3 bg-bg-base w-[calc(100%-1em)] py-2">
|
||||
<Button
|
||||
type="reset"
|
||||
variant={'transparent'}
|
||||
|
||||
Reference in New Issue
Block a user