mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 12:32:30 +08:00
### What problem does this PR solve? Fix: After saving the model parameters of the chat page, the parameter disappears. #11500 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -28,6 +28,7 @@ import { useHandleFreedomChange } from './use-watch-change';
|
||||
interface LlmSettingFieldItemsProps {
|
||||
prefix?: string;
|
||||
options?: any[];
|
||||
llmId?: string;
|
||||
showFields?: Array<
|
||||
| 'temperature'
|
||||
| 'top_p'
|
||||
@ -73,6 +74,7 @@ export function LlmSettingFieldItems({
|
||||
'frequency_penalty',
|
||||
'max_tokens',
|
||||
],
|
||||
llmId,
|
||||
}: LlmSettingFieldItemsProps) {
|
||||
const form = useFormContext();
|
||||
const { t } = useTranslate('chat');
|
||||
@ -131,7 +133,7 @@ export function LlmSettingFieldItems({
|
||||
<div className="space-y-5">
|
||||
<LLMFormField
|
||||
options={options}
|
||||
name={getFieldWithPrefix('llm_id')}
|
||||
name={llmId ?? getFieldWithPrefix('llm_id')}
|
||||
></LLMFormField>
|
||||
<FormField
|
||||
control={form.control}
|
||||
|
||||
@ -3,7 +3,10 @@ import { LlmSettingFieldItems } from '@/components/llm-setting-items/next';
|
||||
export function ChatModelSettings() {
|
||||
return (
|
||||
<div className="space-y-8">
|
||||
<LlmSettingFieldItems prefix="llm_setting"></LlmSettingFieldItems>
|
||||
<LlmSettingFieldItems
|
||||
prefix="llm_setting"
|
||||
llmId="llm_id"
|
||||
></LlmSettingFieldItems>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user