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 {
|
interface LlmSettingFieldItemsProps {
|
||||||
prefix?: string;
|
prefix?: string;
|
||||||
options?: any[];
|
options?: any[];
|
||||||
|
llmId?: string;
|
||||||
showFields?: Array<
|
showFields?: Array<
|
||||||
| 'temperature'
|
| 'temperature'
|
||||||
| 'top_p'
|
| 'top_p'
|
||||||
@ -73,6 +74,7 @@ export function LlmSettingFieldItems({
|
|||||||
'frequency_penalty',
|
'frequency_penalty',
|
||||||
'max_tokens',
|
'max_tokens',
|
||||||
],
|
],
|
||||||
|
llmId,
|
||||||
}: LlmSettingFieldItemsProps) {
|
}: LlmSettingFieldItemsProps) {
|
||||||
const form = useFormContext();
|
const form = useFormContext();
|
||||||
const { t } = useTranslate('chat');
|
const { t } = useTranslate('chat');
|
||||||
@ -131,7 +133,7 @@ export function LlmSettingFieldItems({
|
|||||||
<div className="space-y-5">
|
<div className="space-y-5">
|
||||||
<LLMFormField
|
<LLMFormField
|
||||||
options={options}
|
options={options}
|
||||||
name={getFieldWithPrefix('llm_id')}
|
name={llmId ?? getFieldWithPrefix('llm_id')}
|
||||||
></LLMFormField>
|
></LLMFormField>
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
|
|||||||
@ -3,7 +3,10 @@ import { LlmSettingFieldItems } from '@/components/llm-setting-items/next';
|
|||||||
export function ChatModelSettings() {
|
export function ChatModelSettings() {
|
||||||
return (
|
return (
|
||||||
<div className="space-y-8">
|
<div className="space-y-8">
|
||||||
<LlmSettingFieldItems prefix="llm_setting"></LlmSettingFieldItems>
|
<LlmSettingFieldItems
|
||||||
|
prefix="llm_setting"
|
||||||
|
llmId="llm_id"
|
||||||
|
></LlmSettingFieldItems>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user