feat: frontend multi models support (#804)
Co-authored-by: StyleZhang <jasonapring2015@outlook.com> Co-authored-by: Joel <iamjoel007@gmail.com>
This commit is contained in:
@@ -4,12 +4,14 @@ import React from 'react'
|
||||
import ModelConfig from './model-config'
|
||||
import DataConfig from './data-config'
|
||||
import PluginConfig from './plugins-config'
|
||||
import type { ProviderEnum } from '@/app/components/header/account-setting/model-page/declarations'
|
||||
|
||||
export type IConfigProps = {
|
||||
className?: string
|
||||
readonly?: boolean
|
||||
modelId: string
|
||||
onModelChange?: (modelId: string) => void
|
||||
providerName: ProviderEnum
|
||||
onModelChange?: (modelId: string, providerName: ProviderEnum) => void
|
||||
plugins: Record<string, boolean>
|
||||
onPluginChange?: (key: string, value: boolean) => void
|
||||
dataSets: any[]
|
||||
@@ -20,6 +22,7 @@ const Config: FC<IConfigProps> = ({
|
||||
className,
|
||||
readonly,
|
||||
modelId,
|
||||
providerName,
|
||||
onModelChange,
|
||||
plugins,
|
||||
onPluginChange,
|
||||
@@ -31,6 +34,7 @@ const Config: FC<IConfigProps> = ({
|
||||
<ModelConfig
|
||||
readonly={readonly}
|
||||
modelId={modelId}
|
||||
providerName={providerName}
|
||||
onChange={onModelChange}
|
||||
/>
|
||||
<PluginConfig
|
||||
|
||||
Reference in New Issue
Block a user