4.7-alpha2 (#1027)
* feat: stop toolCall and rename some field. (#46) * perf: node delete tip;pay tip * fix: toolCall cannot save child answer * feat: stop tool * fix: team modal * fix feckbackMoal auth bug (#47) * 简单的支持提示词运行tool。优化workflow模板 (#49) * remove templates * fix: request body undefined * feat: prompt tool run * feat: workflow tamplates modal * perf: plugin start * 4.7 (#50) * fix docker-compose download url (#994) original code is a bad url with '404 NOT FOUND' return. fix docker-compose download url, add 'v' before docker-compose version * Update ai_settings.md (#1000) * Update configuration.md * Update configuration.md * Fix history in classifyQuestion and extract modules (#1012) * Fix history in classifyQuestion and extract modules * Add chatValue2RuntimePrompt import and update text formatting * flow controller to packages * fix: rerank select * modal ui * perf: modal code path * point not sufficient * feat: http url support variable * fix http key * perf: prompt * perf: ai setting modal * simple edit ui --------- Co-authored-by: entorick <entorick11@qq.com> Co-authored-by: liujianglc <liujianglc@163.com> Co-authored-by: Fengrui Liu <liufengrui.work@bytedance.com> * fix team share redirect to login (#51) * feat: support openapi import plugins (#48) * feat: support openapi import plugins * feat: import from url * fix: add body params parse * fix build * fix * fix * fix * tool box ui (#52) * fix: training queue * feat: simple edit tool select * perf: simple edit dataset prompt * fix: chatbox tool ux * feat: quote prompt module * perf: plugin tools sign * perf: model avatar * tool selector ui * feat: max histories * perf: http plugin import (#53) * perf: plugin http import * chatBox ui * perf: name * fix: Node template card (#54) * fix: ts * setting modal * package * package * feat: add plugins search (#57) * feat: add plugins search * perf: change http plugin header input * Yjl (#56) * perf: prompt tool call * perf: chat box ux * doc * doc * price tip * perf: tool selector * ui' * fix: vector queue * fix: empty tool and empty response * fix: empty msg * perf: pg index * perf: ui tip * doc * tool tip --------- Co-authored-by: yst <77910600+yu-and-liu@users.noreply.github.com> Co-authored-by: entorick <entorick11@qq.com> Co-authored-by: liujianglc <liujianglc@163.com> Co-authored-by: Fengrui Liu <liufengrui.work@bytedance.com> Co-authored-by: heheer <71265218+newfish-cmyk@users.noreply.github.com>
@@ -69,6 +69,7 @@ export const iconPaths = {
|
||||
'core/app/simpleMode/template': () => import('./icons/core/app/simpleMode/template.svg'),
|
||||
'core/app/simpleMode/tts': () => import('./icons/core/app/simpleMode/tts.svg'),
|
||||
'core/app/simpleMode/variable': () => import('./icons/core/app/simpleMode/variable.svg'),
|
||||
'core/app/toolCall': () => import('./icons/core/app/toolCall.svg'),
|
||||
'core/app/ttsFill': () => import('./icons/core/app/ttsFill.svg'),
|
||||
'core/app/variable/external': () => import('./icons/core/app/variable/external.svg'),
|
||||
'core/app/variable/input': () => import('./icons/core/app/variable/input.svg'),
|
||||
@@ -101,8 +102,11 @@ export const iconPaths = {
|
||||
'core/dataset/rerank': () => import('./icons/core/dataset/rerank.svg'),
|
||||
'core/dataset/tableCollection': () => import('./icons/core/dataset/tableCollection.svg'),
|
||||
'core/dataset/websiteDataset': () => import('./icons/core/dataset/websiteDataset.svg'),
|
||||
'core/modules/basicNode': () => import('./icons/core/modules/basicNode.svg'),
|
||||
'core/modules/flowLight': () => import('./icons/core/modules/flowLight.svg'),
|
||||
'core/modules/previewLight': () => import('./icons/core/modules/previewLight.svg'),
|
||||
'core/modules/systemPlugin': () => import('./icons/core/modules/systemPlugin.svg'),
|
||||
'core/modules/teamPlugin': () => import('./icons/core/modules/teamPlugin.svg'),
|
||||
'core/modules/variable': () => import('./icons/core/modules/variable.svg'),
|
||||
'core/modules/welcomeText': () => import('./icons/core/modules/welcomeText.svg'),
|
||||
date: () => import('./icons/date.svg'),
|
||||
@@ -131,6 +135,7 @@ export const iconPaths = {
|
||||
kbTest: () => import('./icons/kbTest.svg'),
|
||||
menu: () => import('./icons/menu.svg'),
|
||||
minus: () => import('./icons/minus.svg'),
|
||||
'modal/concat': () => import('./icons/modal/concat.svg'),
|
||||
'modal/confirmPay': () => import('./icons/modal/confirmPay.svg'),
|
||||
'modal/edit': () => import('./icons/modal/edit.svg'),
|
||||
'modal/manualDataset': () => import('./icons/modal/manualDataset.svg'),
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13 12" fill="none">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13 12">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M6.5 2C6.77614 2 7 2.22386 7 2.5V5.5H10C10.2761 5.5 10.5 5.72386 10.5 6C10.5 6.27614 10.2761 6.5 10 6.5H7V9.5C7 9.77614 6.77614 10 6.5 10C6.22386 10 6 9.77614 6 9.5V6.5H3C2.72386 6.5 2.5 6.27614 2.5 6C2.5 5.72386 2.72386 5.5 3 5.5H6V2.5C6 2.22386 6.22386 2 6.5 2Z" />
|
||||
</svg>
|
Before Width: | Height: | Size: 408 B After Width: | Height: | Size: 396 B |
@@ -0,0 +1,12 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 21" fill="none">
|
||||
<path
|
||||
d="M8.96208 3.83326H11.2335C11.9698 3.83326 12.5668 4.43022 12.5668 5.1666V5.44866H14.1665C14.189 5.44866 14.2113 5.44866 14.2335 5.44866V5.1666C14.2335 3.50974 12.8903 2.1666 11.2335 2.1666H8.96208C7.30522 2.1666 5.96208 3.50974 5.96208 5.1666V5.44866H7.62874V5.1666C7.62874 4.43022 8.2257 3.83326 8.96208 3.83326Z"
|
||||
fill="#487FFF" />
|
||||
<path
|
||||
d="M18.6966 9.04808H1.30328C1.31483 8.05698 1.36761 7.46917 1.60886 6.99569C1.8805 6.46256 2.31395 6.02912 2.84708 5.75747C3.45316 5.44866 4.24657 5.44866 5.83338 5.44866H14.1665C15.7534 5.44866 16.5468 5.44866 17.1529 5.75747C17.686 6.02912 18.1194 6.46256 18.3911 6.99569C18.6323 7.46917 18.6851 8.05698 18.6966 9.04808Z"
|
||||
fill="#487FFF" />
|
||||
<path
|
||||
d="M12.1963 10.5314H18.6999V14.3C18.6999 15.8868 18.6999 16.6802 18.3911 17.2863C18.1194 17.8194 17.686 18.2529 17.1529 18.5245C16.5468 18.8333 15.7534 18.8333 14.1665 18.8333H5.83338C4.24657 18.8333 3.45316 18.8333 2.84708 18.5245C2.31395 18.2529 1.8805 17.8194 1.60886 17.2863C1.30005 16.6802 1.30005 15.8868 1.30005 14.3V10.5314H7.80364V13.2689C7.80364 13.545 8.02749 13.7689 8.30364 13.7689H11.6963C11.9724 13.7689 12.1963 13.545 12.1963 13.2689V10.5314Z"
|
||||
fill="#487FFF" />
|
||||
<path d="M9.13697 10.5314H10.863V12.4356H9.13697V10.5314Z" fill="#487FFF" />
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M8.69761 0.888662C8.89698 0.847659 9.1026 0.847659 9.30197 0.888662C9.53242 0.93606 9.7384 1.05143 9.90216 1.14315C9.91741 1.15169 9.93229 1.16003 9.94679 1.16809L15.4968 4.25142C15.5121 4.25994 15.5279 4.26865 15.5441 4.27757C15.7175 4.37305 15.9355 4.49311 16.1028 4.67474C16.2476 4.83178 16.3571 5.0179 16.4241 5.22066C16.5016 5.45519 16.5006 5.70402 16.4999 5.90193C16.4999 5.92042 16.4998 5.93847 16.4998 5.95603V12.0439C16.4998 12.0614 16.4999 12.0795 16.4999 12.098C16.5006 12.2959 16.5016 12.5447 16.4241 12.7792C16.3571 12.982 16.2476 13.1681 16.1028 13.3251C15.9355 13.5068 15.7175 13.6268 15.5442 13.7223C15.5279 13.7312 15.5121 13.7399 15.4968 13.7485L9.94679 16.8318C9.93229 16.8399 9.9174 16.8482 9.90215 16.8567C9.7384 16.9485 9.53242 17.0638 9.30197 17.1112C9.1026 17.1522 8.89698 17.1522 8.69761 17.1112C8.46716 17.0638 8.26118 16.9485 8.09742 16.8567C8.08217 16.8482 8.06729 16.8399 8.05279 16.8318L2.50279 13.7485C2.48744 13.7399 2.47164 13.7312 2.45544 13.7223C2.28209 13.6268 2.06412 13.5068 1.89674 13.3251C1.75203 13.1681 1.64251 12.982 1.57552 12.7792C1.49803 12.5447 1.49893 12.2959 1.49966 12.098C1.49972 12.0795 1.49979 12.0614 1.49979 12.0439V5.95603C1.49979 5.93847 1.49972 5.92042 1.49966 5.90193C1.49893 5.70403 1.49803 5.45519 1.57552 5.22066C1.64251 5.0179 1.75202 4.83178 1.89674 4.67474C2.06412 4.49311 2.28208 4.37306 2.45543 4.27758C2.47163 4.26865 2.48744 4.25994 2.50278 4.25142L8.05279 1.16809C8.06729 1.16003 8.08217 1.15169 8.09742 1.14315C8.26118 1.05143 8.46716 0.93606 8.69761 0.888662ZM8.99979 2.36168C8.99865 2.36223 8.99745 2.3628 8.99621 2.3634C8.95292 2.38427 8.89491 2.41618 8.78125 2.47932L3.79414 5.24994L8.99977 8.14195L14.2054 5.24992L9.21833 2.47932C9.10467 2.41618 9.04666 2.38427 9.00338 2.3634C9.00213 2.3628 9.00094 2.36223 8.99979 2.36168ZM14.9998 6.52454V12.0439C14.9998 12.1811 14.9995 12.2513 14.9964 12.3022C14.9963 12.3037 14.9962 12.3051 14.9961 12.3065C14.995 12.3072 14.9938 12.308 14.9925 12.3088C14.9495 12.3362 14.8883 12.3706 14.7683 12.4372L9.74979 15.2253L9.74977 9.44122L14.9998 6.52454ZM8.24977 9.44122L2.99979 6.52457V12.0439C2.99979 12.1811 3.0001 12.2513 3.00316 12.3022C3.00325 12.3037 3.00335 12.3051 3.00344 12.3065C3.00459 12.3072 3.0058 12.308 3.00707 12.3088C3.05004 12.3362 3.11129 12.3706 3.23125 12.4372L8.24979 15.2253L8.24977 9.44122Z" />
|
||||
</svg>
|
After Width: | Height: | Size: 2.4 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M8.97102 5.68723L8.93214 4.22716C8.91418 3.5528 8.36099 3.01099 7.68174 3.01099C7.00248 3.01099 6.4493 3.5528 6.43134 4.22716L6.39245 5.68723H3.375C3.16789 5.68723 3 5.85512 3 6.06223V7.77955C4.3982 7.83251 5.51546 8.98273 5.51546 10.3939C5.51546 11.8051 4.3982 12.9553 3 13.0082V14.6325C3 14.8396 3.16789 15.0075 3.375 15.0075H5.13833C5.23045 13.6831 6.33396 12.6374 7.68172 12.6374C9.02947 12.6374 10.133 13.6831 10.2251 15.0075H11.9452C12.1523 15.0075 12.3202 14.8396 12.3202 14.6325V11.7055L13.7725 11.6593C14.4518 11.6377 14.9966 11.0792 14.9966 10.394C14.9966 9.70889 14.4518 9.1504 13.7725 9.12879L12.3202 9.08261V6.06222C12.3202 5.85512 12.1523 5.68723 11.9452 5.68723H8.97102ZM8.73132 16.5075V15.187C8.73132 14.6073 8.2614 14.1374 7.68172 14.1374C7.10203 14.1374 6.63211 14.6073 6.63211 15.187V16.5075H3.375C2.33947 16.5075 1.5 15.668 1.5 14.6325V11.5101H2.8992C3.51569 11.5101 4.01546 11.0104 4.01546 10.3939C4.01546 9.7774 3.51569 9.27764 2.8992 9.27764L1.5 9.27764V6.06223C1.5 5.02669 2.33947 4.18722 3.375 4.18722H4.93187C4.97141 2.70246 6.18743 1.51099 7.68174 1.51099C9.17604 1.51099 10.3921 2.70246 10.4316 4.18722H11.9452C12.9807 4.18722 13.8202 5.02669 13.8202 6.06222V7.62955C15.3063 7.67682 16.4966 8.89643 16.4966 10.394C16.4966 11.8916 15.3063 13.1112 13.8202 13.1585V14.6325C13.8202 15.668 12.9807 16.5075 11.9452 16.5075H8.73132Z" />
|
||||
</svg>
|
After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19 18">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M9.49989 3C8.05014 3 6.87489 4.17525 6.87489 5.625C6.87489 7.07475 8.05014 8.25 9.49989 8.25C10.9496 8.25 12.1249 7.07475 12.1249 5.625C12.1249 4.17525 10.9496 3 9.49989 3ZM5.37489 5.625C5.37489 3.34683 7.22171 1.5 9.49989 1.5C11.7781 1.5 13.6249 3.34683 13.6249 5.625C13.6249 7.90317 11.7781 9.75 9.49989 9.75C7.22171 9.75 5.37489 7.90317 5.37489 5.625ZM9.49989 12C7.37062 12 5.47275 13.027 4.26027 14.6316C4.1861 14.7298 4.12933 14.805 4.08211 14.8711C4.04626 14.9213 4.0218 14.9581 4.00477 14.9861C4.11624 14.9988 4.27506 15 4.57031 15H14.4295C14.7247 15 14.8835 14.9988 14.995 14.9861C14.978 14.9581 14.9535 14.9213 14.9177 14.8711C14.8704 14.805 14.8137 14.7298 14.7395 14.6316C13.527 13.027 11.6292 12 9.49989 12ZM3.0635 13.7273C4.54322 11.769 6.87405 10.5 9.49989 10.5C12.1257 10.5 14.4566 11.769 15.9363 13.7273C15.943 13.7362 15.9497 13.7451 15.9564 13.754C16.0837 13.9222 16.2201 14.1026 16.3176 14.2767C16.4356 14.4873 16.523 14.731 16.5176 15.0274C16.5133 15.2657 16.4411 15.4887 16.3534 15.6648C16.2658 15.8409 16.1313 16.0329 15.9439 16.18C15.6939 16.3762 15.4217 16.4457 15.1799 16.4747C14.9678 16.5001 14.7164 16.5001 14.4636 16.5C14.4523 16.5 14.4409 16.5 14.4295 16.5H4.57031C4.55892 16.5 4.54753 16.5 4.53613 16.5C4.28339 16.5001 4.032 16.5001 3.81987 16.4747C3.57808 16.4457 3.3059 16.3762 3.05591 16.18C2.86845 16.0329 2.73403 15.8409 2.64637 15.6648C2.55871 15.4887 2.48653 15.2657 2.48217 15.0274C2.47675 14.731 2.56421 14.4873 2.68221 14.2767C2.7797 14.1026 2.91611 13.9222 3.04334 13.754C3.05009 13.7451 3.05681 13.7362 3.0635 13.7273Z" />
|
||||
</svg>
|
After Width: | Height: | Size: 1.7 KiB |
12
packages/web/components/common/Icon/icons/modal/concat.svg
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1700745458924"
|
||||
class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="30191"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128">
|
||||
<path d="M0 512a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#EFF2FF" p-id="30192"></path>
|
||||
<path
|
||||
d="M682.666667 682.666667c9.898667 9.841778-9.841778-9.841778 0 0zM338.488889 685.511111l5.688889-5.688889c-1.080889 0.682667-2.161778 2.104889-2.844445 2.844445a10.752 10.752 0 0 0-2.844444 2.844444z"
|
||||
fill="#000000" p-id="30193"></path>
|
||||
<path
|
||||
d="M784.896 740.693333c23.324444-40.504889 10.410667-71.68-30.947556-102.798222-48.696889-36.579556-96.199111-61.212444-130.389333-21.788444 0 0-36.295111 43.064889-143.075555-57.685334C356.352 440.490667 408.462222 398.677333 408.462222 398.677333c43.178667-43.235556 15.701333-75.548444-20.48-124.416-36.238222-48.924444-72.817778-64.341333-125.326222-22.300444-101.262222 81.009778 41.528889 271.189333 113.607111 345.144889 0 0 109.738667 113.095111 178.801778 150.755555l36.920889 20.593778c52.906667 27.079111 112.469333 39.480889 154.339555 14.336 0 0 20.195556-10.353778 38.570667-42.097778z"
|
||||
fill="#4D4DEE" p-id="30194"></path>
|
||||
</svg>
|
After Width: | Height: | Size: 1.3 KiB |
@@ -78,7 +78,7 @@ export default function Editor({
|
||||
);
|
||||
|
||||
return (
|
||||
<Box position={'relative'} width={'full'} h={`${h}px`} cursor={'text'}>
|
||||
<Box position={'relative'} width={'full'} h={`${h}px`} cursor={'text'} overflowY={'visible'}>
|
||||
<LexicalComposer initialConfig={initialConfig} key={key}>
|
||||
<PlainTextPlugin
|
||||
contentEditable={<ContentEditable className={styles.contentEditable} />}
|
||||
|
@@ -18,10 +18,9 @@ export interface MyModalProps extends ModalContentProps {
|
||||
isCentered?: boolean;
|
||||
isOpen: boolean;
|
||||
onClose?: () => void;
|
||||
isPc?: boolean;
|
||||
}
|
||||
|
||||
const CustomModal = ({
|
||||
const MyModal = ({
|
||||
isOpen,
|
||||
onClose,
|
||||
iconSrc,
|
||||
@@ -92,4 +91,4 @@ const CustomModal = ({
|
||||
);
|
||||
};
|
||||
|
||||
export default CustomModal;
|
||||
export default React.memo(MyModal);
|
@@ -92,7 +92,8 @@ const MySelect = (
|
||||
: `${width} !important`;
|
||||
})()}
|
||||
w={'auto'}
|
||||
p={'6px'}
|
||||
px={'6px'}
|
||||
py={'6px'}
|
||||
border={'1px solid #fff'}
|
||||
boxShadow={
|
||||
'0px 2px 4px rgba(161, 167, 179, 0.25), 0px 0px 1px rgba(121, 141, 159, 0.25);'
|
||||
|
17
packages/web/components/common/MyTooltip/QuestionTip.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import React from 'react';
|
||||
import MyTooltip from '.';
|
||||
import { IconProps, QuestionOutlineIcon } from '@chakra-ui/icons';
|
||||
|
||||
type Props = IconProps & {
|
||||
label?: string;
|
||||
};
|
||||
|
||||
const QuestionTip = ({ label, ...props }: Props) => {
|
||||
return (
|
||||
<MyTooltip label={label}>
|
||||
<QuestionOutlineIcon {...props} />
|
||||
</MyTooltip>
|
||||
);
|
||||
};
|
||||
|
||||
export default QuestionTip;
|
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { Flex, Box } from '@chakra-ui/react';
|
||||
import { Flex, Box, BoxProps } from '@chakra-ui/react';
|
||||
import MyIcon from '../Icon';
|
||||
|
||||
type Props = {
|
||||
type Props = BoxProps & {
|
||||
list: {
|
||||
icon?: string;
|
||||
label: string | React.ReactNode;
|
||||
@@ -12,7 +12,7 @@ type Props = {
|
||||
onChange: (e: string) => void;
|
||||
};
|
||||
|
||||
const RowTabs = ({ list, value, onChange }: Props) => {
|
||||
const RowTabs = ({ list, value, onChange, py = '7px', px = '12px', ...props }: Props) => {
|
||||
return (
|
||||
<Box
|
||||
display={'inline-flex'}
|
||||
@@ -23,16 +23,19 @@ const RowTabs = ({ list, value, onChange }: Props) => {
|
||||
borderColor={'borderColor.base'}
|
||||
bg={'myGray.50'}
|
||||
gap={'4px'}
|
||||
{...props}
|
||||
>
|
||||
{list.map((item) => (
|
||||
<Flex
|
||||
key={item.value}
|
||||
flex={'1 0 0'}
|
||||
alignItems={'center'}
|
||||
cursor={'pointer'}
|
||||
borderRadius={'md'}
|
||||
px={'12px'}
|
||||
py={'7px'}
|
||||
px={px}
|
||||
py={py}
|
||||
userSelect={'none'}
|
||||
whiteSpace={'noWrap'}
|
||||
{...(value === item.value
|
||||
? {
|
||||
bg: 'white',
|
||||
|
@@ -2,7 +2,7 @@ import { Button, ModalBody, ModalFooter, useDisclosure } from '@chakra-ui/react'
|
||||
import React, { useEffect } from 'react';
|
||||
import { editorStateToText } from './utils';
|
||||
import Editor from './Editor';
|
||||
import MyModal from '../../CustomModal';
|
||||
import MyModal from '../../MyModal';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { $getRoot, EditorState, type LexicalEditor } from 'lexical';
|
||||
import { EditorVariablePickerType } from './type.d';
|
||||
|
@@ -41,7 +41,7 @@ export default function DropDownMenu({
|
||||
borderColor={'borderColor.base'}
|
||||
p={2}
|
||||
borderRadius={'md'}
|
||||
position={'fixed'}
|
||||
position={'absolute'}
|
||||
w={'auto'}
|
||||
zIndex={99999}
|
||||
maxH={'300px'}
|
||||
|
@@ -62,7 +62,7 @@ export default function VariablePickerPlugin({
|
||||
borderColor={'borderColor.base'}
|
||||
p={2}
|
||||
borderRadius={'md'}
|
||||
position={'fixed'}
|
||||
position={'absolute'}
|
||||
w={'auto'}
|
||||
overflow={'hidden'}
|
||||
zIndex={99999}
|
||||
|