Skip to content

Commit

Permalink
feat: data-handle detail add high-config and model-app upload icon ad…
Browse files Browse the repository at this point in the history
…d validate
  • Loading branch information
Carrotzpc authored and linqiqi077 committed Dec 22, 2023
2 parents a67b9cc + d8ebdaa commit 4afcb9f
Show file tree
Hide file tree
Showing 17 changed files with 336 additions and 181 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"@tenx-ui/utils": "^2.3.1",
"@umijs/max": "^4.0.42",
"@yunti/lowcode-datasource-axios-handler": "^1.0.1",
"@yuntijs/arcadia-bff-sdk": "^1.0.48",
"@yuntijs/arcadia-bff-sdk": "^1.0.50",
"KubeAGIUpload": "workspace:*",
"antd": "^5.12.2",
"app-card": "workspace:*",
Expand Down
55 changes: 15 additions & 40 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion src/components/Status/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ interface props {
const Status: React.FC<props> = props => {
const { status, text } = props;
// 0灰,1 绿,3 红
const _c = { info: '#1677ff', success: '#5cb85c', error: '#f85a5a' }[status];
const _c = {
info: '#1677ff',
success: '#5cb85c',
error: '#f85a5a',
default: 'rgba(0, 0, 0, 0.25)',
}[status];
return (
<div style={{ color: _c, display: 'inline-block' }}>
{_c && <TenxIcon type="Circle" />}
Expand Down
20 changes: 6 additions & 14 deletions src/pages/CreateDataHandle/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class $$Page extends React.Component {
max_tokens: 512,
prompt_template: `{text}
请将上述内容按照问答的方式,提出不超过 25 个问题,并给出每个问题的答案,每个问题必须有 Q 和对应的 A,并严格按照以下方式展示: Q1: 问题。\n A1: 答案。\n Q2: 问题 \n A2: 答案\n 注意,尽可能多的提出问题,但是 Q 不要重复,也不要出现只有 Q 没有 A 的情况。`,
请将上述内容按照问答的方式,提出不超过 25 个问题,并给出每个问题的答案,每个问题必须有 Q 和对应的 A,并严格按照以下方式展示: Q1: 问题。\n A1: 答案。\n Q2: 问题 \n A2: 答案\n 注意,尽可能多的提出问题,但是 Q 不要重复,也不要出现只有 Q 没有 A 的情况。`,
},
selectedFileList: [],
showLlmModel: false,
Expand Down Expand Up @@ -779,7 +779,7 @@ class $$Page extends React.Component {
});
}

setQaSplitHighConfigValue(value, event, extraParams = {}) {
setQaSplitHighConfigValue(_value, event, extraParams = {}) {
const fieldName = {
...event,
...extraParams,
Expand All @@ -788,22 +788,14 @@ class $$Page extends React.Component {
...event,
...extraParams,
}.times;
console.log({
...event,
...extraParams,
});
const value = fieldName === 'prompt_template' ? _value.target.value : _value;
const qaSplitHighConfig = {
...this.state.qaSplitHighConfig,
[fieldName]: times ? value * times : value,
};
this.setState(
{
qaSplitHighConfig,
},
() => {
console.log(this.state.qaSplitHighConfig);
}
);
this.setState({
qaSplitHighConfig,
});
if (fieldName === 'temperature') {
this.form('temperature_form').setValues({
temperature: qaSplitHighConfig.temperature / 100,
Expand Down
Loading

0 comments on commit 4afcb9f

Please sign in to comment.