feat: add jina (#967)

### What problem does this PR solve?
feat: add jina #650 

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-05-29 16:48:52 +08:00
committed by GitHub
parent a135f9f5b6
commit e1f0644deb
4 changed files with 238 additions and 7 deletions

View File

@ -22,8 +22,8 @@ import { useTranslate } from '@/hooks/commonHooks';
import styles from './index.less';
const layout = {
labelCol: { span: 7 },
wrapperCol: { span: 17 },
labelCol: { span: 9 },
wrapperCol: { span: 15 },
};
const validateMessages = {

View File

@ -176,7 +176,7 @@ const PromptEngine = (
<Rerank></Rerank>
<section className={classNames(styles.variableContainer)}>
<Row align={'middle'} justify="end">
<Col span={7} className={styles.variableAlign}>
<Col span={9} className={styles.variableAlign}>
<label className={styles.variableLabel}>
{t('variable')}
<Tooltip title={t('variableTip')}>
@ -184,7 +184,7 @@ const PromptEngine = (
</Tooltip>
</label>
</Col>
<Col span={17} className={styles.variableAlign}>
<Col span={15} className={styles.variableAlign}>
<Button size="small" onClick={handleAdd}>
{t('add')}
</Button>

View File

@ -37,13 +37,13 @@ import {
useSelectModelProvidersLoading,
useSubmitApiKey,
useSubmitOllama,
useSubmitVolcEngine,
useSubmitSystemModelSetting,
useSubmitVolcEngine,
} from './hooks';
import styles from './index.less';
import OllamaModal from './ollama-modal';
import VolcEngineModal from "./volcengine-model";
import SystemModelSettingModal from './system-model-setting-modal';
import VolcEngineModal from './volcengine-model';
const IconMap = {
'Tongyi-Qianwen': 'tongyi',
@ -56,6 +56,7 @@ const IconMap = {
DeepSeek: 'deepseek',
VolcEngine: 'volc_engine',
BaiChuan: 'baichuan',
Jina: 'jina',
};
const LlmIcon = ({ name }: { name: string }) => {
@ -103,7 +104,9 @@ const ModelCard = ({ item, clickApiKey }: IModelCardProps) => {
<Col span={12} className={styles.factoryOperationWrapper}>
<Space size={'middle'}>
<Button onClick={handleApiKeyClick}>
{isLocalLlmFactory(item.name) || item.name === 'VolcEngine' ? t('addTheModel') : 'API-Key'}
{isLocalLlmFactory(item.name) || item.name === 'VolcEngine'
? t('addTheModel')
: 'API-Key'}
<SettingOutlined />
</Button>
<Button onClick={handleShowMoreClick}>