Feat: Fixed the chat model setting echo issue (#9521)

### What problem does this PR solve?

Feat: Fixed the chat model setting echo issue

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-08-18 12:03:33 +08:00
committed by GitHub
parent fb77f9917b
commit b08650bc4c
6 changed files with 88 additions and 25 deletions

View File

@ -28,20 +28,32 @@ interface LlmSettingFieldItemsProps {
options?: any[];
}
export const LlmSettingSchema = {
export const LLMIdFormField = {
llm_id: z.string(),
temperature: z.coerce.number().optional(),
top_p: z.number().optional(),
presence_penalty: z.coerce.number().optional(),
frequency_penalty: z.coerce.number().optional(),
};
export const LlmSettingEnabledSchema = {
temperatureEnabled: z.boolean().optional(),
topPEnabled: z.boolean().optional(),
presencePenaltyEnabled: z.boolean().optional(),
frequencyPenaltyEnabled: z.boolean().optional(),
maxTokensEnabled: z.boolean().optional(),
};
export const LlmSettingFieldSchema = {
temperature: z.coerce.number().optional(),
top_p: z.number().optional(),
presence_penalty: z.coerce.number().optional(),
frequency_penalty: z.coerce.number().optional(),
max_tokens: z.number().optional(),
};
export const LlmSettingSchema = {
...LLMIdFormField,
...LlmSettingFieldSchema,
...LlmSettingEnabledSchema,
};
export function LlmSettingFieldItems({
prefix,
options,