Przeglądaj źródła

Feat: Add model id to ExeSql operator form. #1739 (#4333)

### What problem does this PR solve?

Feat: Add model id to ExeSql operator form. #1739

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
tags/v0.16.0
balibabu 10 miesięcy temu
rodzic
commit
5083d92998
No account linked to committer's email address

+ 1
- 0
web/src/pages/flow/constant.tsx Wyświetl plik

}; };


export const initialExeSqlValues = { export const initialExeSqlValues = {
...initialLlmBaseValues,
db_type: 'mysql', db_type: 'mysql',
database: '', database: '',
username: '', username: '',

+ 8
- 0
web/src/pages/flow/form/exesql-form/index.tsx Wyświetl plik

import LLMSelect from '@/components/llm-select';
import TopNItem from '@/components/top-n-item'; import TopNItem from '@/components/top-n-item';
import { useTranslate } from '@/hooks/common-hooks'; import { useTranslate } from '@/hooks/common-hooks';
import { useTestDbConnect } from '@/hooks/flow-hooks'; import { useTestDbConnect } from '@/hooks/flow-hooks';
layout={'vertical'} layout={'vertical'}
> >
<DynamicInputVariable node={node}></DynamicInputVariable> <DynamicInputVariable node={node}></DynamicInputVariable>
<Form.Item
name={'llm_id'}
label={t('model', { keyPrefix: 'chat' })}
tooltip={t('modelTip', { keyPrefix: 'chat' })}
>
<LLMSelect></LLMSelect>
</Form.Item>
<Form.Item <Form.Item
label={t('dbType')} label={t('dbType')}
name={'db_type'} name={'db_type'}

+ 1
- 1
web/src/pages/flow/hooks.tsx Wyświetl plik

[Operator.GitHub]: initialGithubValues, [Operator.GitHub]: initialGithubValues,
[Operator.BaiduFanyi]: initialBaiduFanyiValues, [Operator.BaiduFanyi]: initialBaiduFanyiValues,
[Operator.QWeather]: initialQWeatherValues, [Operator.QWeather]: initialQWeatherValues,
[Operator.ExeSQL]: initialExeSqlValues,
[Operator.ExeSQL]: { ...initialExeSqlValues, llm_id: llmId },
[Operator.Switch]: initialSwitchValues, [Operator.Switch]: initialSwitchValues,
[Operator.WenCai]: initialWenCaiValues, [Operator.WenCai]: initialWenCaiValues,
[Operator.AkShare]: initialAkShareValues, [Operator.AkShare]: initialAkShareValues,

Ładowanie…
Anuluj
Zapisz