mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-20 23:22:05 +08:00
feat: add cherryin in provider type options (#10891)
This commit is contained in:
parent
f088069fb3
commit
4a38f2e8b1
@ -24,6 +24,7 @@ const PopupContainer: React.FC<Props> = ({ provider, resolve }) => {
|
||||
const [open, setOpen] = useState(true)
|
||||
const [name, setName] = useState(provider?.name || '')
|
||||
const [type, setType] = useState<ProviderType>(provider?.type || 'openai')
|
||||
const [displayType, setDisplayType] = useState<string>(provider?.type || 'openai')
|
||||
const [logo, setLogo] = useState<string | null>(null)
|
||||
const [logoPickerOpen, setLogoPickerOpen] = useState(false)
|
||||
const [dropdownOpen, setDropdownOpen] = useState(false)
|
||||
@ -245,15 +246,20 @@ const PopupContainer: React.FC<Props> = ({ provider, resolve }) => {
|
||||
</Form.Item>
|
||||
<Form.Item label={t('settings.provider.add.type')} style={{ marginBottom: 0 }}>
|
||||
<Select
|
||||
value={type}
|
||||
onChange={setType}
|
||||
value={displayType}
|
||||
onChange={(value: string) => {
|
||||
setDisplayType(value)
|
||||
// special case for cherryin-type, map to new-api internally
|
||||
setType(value === 'cherryin-type' ? 'new-api' : (value as ProviderType))
|
||||
}}
|
||||
options={[
|
||||
{ label: 'OpenAI', value: 'openai' },
|
||||
{ label: 'OpenAI-Response', value: 'openai-response' },
|
||||
{ label: 'Gemini', value: 'gemini' },
|
||||
{ label: 'Anthropic', value: 'anthropic' },
|
||||
{ label: 'Azure OpenAI', value: 'azure-openai' },
|
||||
{ label: 'New API', value: 'new-api' }
|
||||
{ label: 'New API', value: 'new-api' },
|
||||
{ label: 'CherryIN', value: 'cherryin-type' }
|
||||
]}
|
||||
/>
|
||||
</Form.Item>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user