balibabu commited on
Commit
459ac83
·
1 Parent(s): d594e0f

feat: add jina (#967)

Browse files

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

### Type of change

- [x] New Feature (non-breaking change which adds functionality)

web/src/assets/svg/llm/jina.svg ADDED
web/src/pages/chat/chat-configuration-modal/index.tsx CHANGED
@@ -22,8 +22,8 @@ import { useTranslate } from '@/hooks/commonHooks';
22
  import styles from './index.less';
23
 
24
  const layout = {
25
- labelCol: { span: 7 },
26
- wrapperCol: { span: 17 },
27
  };
28
 
29
  const validateMessages = {
 
22
  import styles from './index.less';
23
 
24
  const layout = {
25
+ labelCol: { span: 9 },
26
+ wrapperCol: { span: 15 },
27
  };
28
 
29
  const validateMessages = {
web/src/pages/chat/chat-configuration-modal/prompt-engine.tsx CHANGED
@@ -176,7 +176,7 @@ const PromptEngine = (
176
  <Rerank></Rerank>
177
  <section className={classNames(styles.variableContainer)}>
178
  <Row align={'middle'} justify="end">
179
- <Col span={7} className={styles.variableAlign}>
180
  <label className={styles.variableLabel}>
181
  {t('variable')}
182
  <Tooltip title={t('variableTip')}>
@@ -184,7 +184,7 @@ const PromptEngine = (
184
  </Tooltip>
185
  </label>
186
  </Col>
187
- <Col span={17} className={styles.variableAlign}>
188
  <Button size="small" onClick={handleAdd}>
189
  {t('add')}
190
  </Button>
 
176
  <Rerank></Rerank>
177
  <section className={classNames(styles.variableContainer)}>
178
  <Row align={'middle'} justify="end">
179
+ <Col span={9} className={styles.variableAlign}>
180
  <label className={styles.variableLabel}>
181
  {t('variable')}
182
  <Tooltip title={t('variableTip')}>
 
184
  </Tooltip>
185
  </label>
186
  </Col>
187
+ <Col span={15} className={styles.variableAlign}>
188
  <Button size="small" onClick={handleAdd}>
189
  {t('add')}
190
  </Button>
web/src/pages/user-setting/setting-model/index.tsx CHANGED
@@ -37,13 +37,13 @@ import {
37
  useSelectModelProvidersLoading,
38
  useSubmitApiKey,
39
  useSubmitOllama,
40
- useSubmitVolcEngine,
41
  useSubmitSystemModelSetting,
 
42
  } from './hooks';
43
  import styles from './index.less';
44
  import OllamaModal from './ollama-modal';
45
- import VolcEngineModal from "./volcengine-model";
46
  import SystemModelSettingModal from './system-model-setting-modal';
 
47
 
48
  const IconMap = {
49
  'Tongyi-Qianwen': 'tongyi',
@@ -56,6 +56,7 @@ const IconMap = {
56
  DeepSeek: 'deepseek',
57
  VolcEngine: 'volc_engine',
58
  BaiChuan: 'baichuan',
 
59
  };
60
 
61
  const LlmIcon = ({ name }: { name: string }) => {
@@ -103,7 +104,9 @@ const ModelCard = ({ item, clickApiKey }: IModelCardProps) => {
103
  <Col span={12} className={styles.factoryOperationWrapper}>
104
  <Space size={'middle'}>
105
  <Button onClick={handleApiKeyClick}>
106
- {isLocalLlmFactory(item.name) || item.name === 'VolcEngine' ? t('addTheModel') : 'API-Key'}
 
 
107
  <SettingOutlined />
108
  </Button>
109
  <Button onClick={handleShowMoreClick}>
 
37
  useSelectModelProvidersLoading,
38
  useSubmitApiKey,
39
  useSubmitOllama,
 
40
  useSubmitSystemModelSetting,
41
+ useSubmitVolcEngine,
42
  } from './hooks';
43
  import styles from './index.less';
44
  import OllamaModal from './ollama-modal';
 
45
  import SystemModelSettingModal from './system-model-setting-modal';
46
+ import VolcEngineModal from './volcengine-model';
47
 
48
  const IconMap = {
49
  'Tongyi-Qianwen': 'tongyi',
 
56
  DeepSeek: 'deepseek',
57
  VolcEngine: 'volc_engine',
58
  BaiChuan: 'baichuan',
59
+ Jina: 'jina',
60
  };
61
 
62
  const LlmIcon = ({ name }: { name: string }) => {
 
104
  <Col span={12} className={styles.factoryOperationWrapper}>
105
  <Space size={'middle'}>
106
  <Button onClick={handleApiKeyClick}>
107
+ {isLocalLlmFactory(item.name) || item.name === 'VolcEngine'
108
+ ? t('addTheModel')
109
+ : 'API-Key'}
110
  <SettingOutlined />
111
  </Button>
112
  <Button onClick={handleShowMoreClick}>