|
|
|
|
@ -190,26 +190,22 @@ const ModelParameterModal: FC<ModelParameterModalProps> = ({
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
</PortalToFollowElemTrigger>
|
|
|
|
|
<PortalToFollowElemContent className={cn(portalToFollowElemContentClassName, 'z-[60]')}>
|
|
|
|
|
<div className={cn(popupClassName, 'w-[496px] rounded-xl border border-gray-100 bg-white shadow-xl')}>
|
|
|
|
|
<div className={cn(
|
|
|
|
|
'max-h-[480px] overflow-y-auto',
|
|
|
|
|
!isInWorkflow && 'px-10 pt-6 pb-8',
|
|
|
|
|
isInWorkflow && 'p-4')}>
|
|
|
|
|
<div className='flex items-center justify-between h-8'>
|
|
|
|
|
<div className={cn('font-semibold text-gray-900 shrink-0', isInWorkflow && 'text-[13px]')}>
|
|
|
|
|
<PortalToFollowElemContent className={cn('z-[60]', portalToFollowElemContentClassName)}>
|
|
|
|
|
<div className={cn(popupClassName, 'w-[389px] rounded-2xl border-[0.5px] border-components-panel-border bg-components-panel-bg shadow-lg')}>
|
|
|
|
|
<div className={cn('max-h-[420px] p-4 pt-3 overflow-y-auto')}>
|
|
|
|
|
<div className='relative'>
|
|
|
|
|
<div className={cn('mb-1 h-6 flex items-center text-text-secondary system-sm-semibold')}>
|
|
|
|
|
{t('common.modelProvider.model').toLocaleUpperCase()}
|
|
|
|
|
</div>
|
|
|
|
|
<ModelSelector
|
|
|
|
|
defaultModel={(provider || modelId) ? { provider, model: modelId } : undefined}
|
|
|
|
|
modelList={activeTextGenerationModelList}
|
|
|
|
|
onSelect={handleChangeModel}
|
|
|
|
|
triggerClassName='max-w-[295px]'
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
{
|
|
|
|
|
!!parameterRules.length && (
|
|
|
|
|
<div className='my-5 h-[1px] bg-gray-100' />
|
|
|
|
|
<div className='my-3 h-[1px] bg-divider-subtle' />
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
@ -219,8 +215,8 @@ const ModelParameterModal: FC<ModelParameterModalProps> = ({
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
!isLoading && !!parameterRules.length && (
|
|
|
|
|
<div className='flex items-center justify-between mb-4'>
|
|
|
|
|
<div className={cn('font-semibold text-gray-900', isInWorkflow && 'text-[13px]')}>{t('common.modelProvider.parameters')}</div>
|
|
|
|
|
<div className='flex items-center justify-between mb-2'>
|
|
|
|
|
<div className={cn('h-6 flex items-center text-text-secondary system-sm-semibold')}>{t('common.modelProvider.parameters')}</div>
|
|
|
|
|
{
|
|
|
|
|
PROVIDER_WITH_PRESET_TONE.includes(provider) && (
|
|
|
|
|
<PresetsParameter onSelect={handleSelectPresetParameter} />
|
|
|
|
|
@ -237,7 +233,6 @@ const ModelParameterModal: FC<ModelParameterModalProps> = ({
|
|
|
|
|
].map(parameter => (
|
|
|
|
|
<ParameterItem
|
|
|
|
|
key={`${modelId}-${parameter.name}`}
|
|
|
|
|
className='mb-4'
|
|
|
|
|
parameterRule={parameter}
|
|
|
|
|
value={completionParams?.[parameter.name]}
|
|
|
|
|
onChange={v => handleParamChange(parameter.name, v)}
|
|
|
|
|
@ -250,7 +245,7 @@ const ModelParameterModal: FC<ModelParameterModalProps> = ({
|
|
|
|
|
</div>
|
|
|
|
|
{!hideDebugWithMultipleModel && (
|
|
|
|
|
<div
|
|
|
|
|
className='flex items-center justify-between px-6 h-[50px] bg-gray-50 border-t border-t-gray-100 text-xs font-medium text-primary-600 cursor-pointer rounded-b-xl'
|
|
|
|
|
className='flex items-center justify-between px-4 h-[50px] bg-components-section-burn border-t border-t-divider-subtle system-sm-regular text-text-accent cursor-pointer rounded-b-xl'
|
|
|
|
|
onClick={() => onDebugWithMultipleModelChange?.()}
|
|
|
|
|
>
|
|
|
|
|
{
|
|
|
|
|
|