| 14 | import {v4 as uuidv4} from 'uuid'; |
| 15 | |
| 16 | function App({i18n}) { |
| 17 | const [open, setOpen] = useState(false); |
| 18 | const ctlRef = useRef(); |
| 19 | const agentRef = useRef(); |
| 20 | |
| 21 | useEffect(() => { |
| 22 | const stage = document.getElementById('stage'); |
| 23 | const configs = []; |
| 24 | configs.push({ |
| 25 | node: 'startNodeStart', |
| 26 | urls: {customHistoryUrl: ''}, |
| 27 | }); |
| 28 | configs.push({ |
| 29 | node: 'llmNodeState', urls: { |
| 30 | llmModelEndpoint: '', |
| 31 | toolListEndpoint: '', |
| 32 | workflowListEndpoint: '', |
| 33 | }, params: { |
| 34 | tenantId: '', appId: '', |
| 35 | }, |
| 36 | }); |
| 37 | configs.push({ |
| 38 | node: 'knowledgeState', |
| 39 | urls: {knowledgeUrl: ''}, |
| 40 | }); |
| 41 | configs.push({ |
| 42 | node: 'fitInvokeState', urls: { |
| 43 | serviceListEndpoint: '', |
| 44 | fitableMetaInfoUrl: '', |
| 45 | }, |
| 46 | }); |
| 47 | configs.push({ |
| 48 | node: 'manualCheckNodeState', |
| 49 | urls: {runtimeFormUrl: ''}, |
| 50 | }); |
| 51 | configs.push({ |
| 52 | node: 'codeNodeState', urls: { |
| 53 | testCodeUrl: '', |
| 54 | }, |
| 55 | }); |
| 56 | configs.push({ |
| 57 | node: 'replyNodeState', urls: { |
| 58 | testCodeUrl: '', |
| 59 | }, |
| 60 | }); |
| 61 | configs.push({ |
| 62 | node: 'evaluationAlgorithmsNodeState', urls: { |
| 63 | evaluationAlgorithmsUrl: '', |
| 64 | }, |
| 65 | }); |
| 66 | configs.push({ |
| 67 | node: 'evaluationTestSetNodeState', urls: { |
| 68 | datasetUrlPrefix: '', |
| 69 | }, |
| 70 | }); |
| 71 | configs.push({ |
| 72 | node: 'queryOptimizationNodeState', |
| 73 | urls: { |