/* Copyright (C) 2025 QuantumNous This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ import React from 'react'; import { Input, Slider, Typography, Button, Tag } from '@douyinfe/semi-ui'; import { Hash, Thermometer, Target, Repeat, Ban, Shuffle, Check, X, } from 'lucide-react'; const ParameterControl = ({ inputs, parameterEnabled, onInputChange, onParameterToggle, disabled = false, }) => { return ( <> {/* Temperature */}
Temperature {inputs.temperature}
控制输出的随机性和创造性 onInputChange('temperature', value)} className='mt-2' disabled={!parameterEnabled.temperature || disabled} />
{/* Top P */}
Top P {inputs.top_p}
核采样,控制词汇选择的多样性 onInputChange('top_p', value)} className='mt-2' disabled={!parameterEnabled.top_p || disabled} />
{/* Frequency Penalty */}
Frequency Penalty {inputs.frequency_penalty}
频率惩罚,减少重复词汇的出现 onInputChange('frequency_penalty', value)} className='mt-2' disabled={!parameterEnabled.frequency_penalty || disabled} />
{/* Presence Penalty */}
Presence Penalty {inputs.presence_penalty}
存在惩罚,鼓励讨论新话题 onInputChange('presence_penalty', value)} className='mt-2' disabled={!parameterEnabled.presence_penalty || disabled} />
{/* MaxTokens */}
Max Tokens
onInputChange('max_tokens', value)} className='!rounded-lg' disabled={!parameterEnabled.max_tokens || disabled} />
{/* Seed */}
Seed (可选,用于复现结果)
onInputChange('seed', value === '' ? null : value) } className='!rounded-lg' disabled={!parameterEnabled.seed || disabled} />
); }; export default ParameterControl;