格式化代码
This commit is contained in:
parent
407e22aabe
commit
46dc09ffe8
|
|
@ -1,12 +1,7 @@
|
|||
package com.electromagnetic.industry.software.manage.config;
|
||||
|
||||
import org.springframework.ai.chat.client.advisor.MessageChatMemoryAdvisor;
|
||||
import org.springframework.ai.embedding.EmbeddingModel;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
public class AiAdvisor {
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ import com.electromagnetic.industry.software.manage.pojo.req.QueryDTO;
|
|||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.ai.chat.client.ChatClient;
|
||||
import org.springframework.ai.chat.client.advisor.MessageChatMemoryAdvisor;
|
||||
import org.springframework.ai.chat.messages.UserMessage;
|
||||
import org.springframework.ai.chat.model.ChatResponse;
|
||||
import org.springframework.ai.chat.prompt.Prompt;
|
||||
|
|
@ -53,7 +52,7 @@ public class ChatService {
|
|||
private VectorStore vectorStore;
|
||||
@Resource
|
||||
private OllamaChatModel model;
|
||||
// @Resource
|
||||
// @Resource
|
||||
// private MessageChatMemoryAdvisor messageChatMemoryAdvisor;
|
||||
@Resource
|
||||
private AiFileUploadRecordMapper aiFileUploadRecordMapper;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
package com.electromagnetic.industry.software.manage.service.serviceimpl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.electromagnetic.industry.software.common.enums.DataOwnEnum;
|
||||
import com.electromagnetic.industry.software.common.enums.EffectFlagEnum;
|
||||
import com.electromagnetic.industry.software.common.enums.EleDataStatusEnum;
|
||||
|
|
@ -92,10 +94,13 @@ public class PermissionServiceImpl implements PermissionService {
|
|||
.eq(RolePermission::getPermissionCode, FilePermission.VIEW.getCode());
|
||||
List<String> ids = rolePermissionService.listObjs(queryWrapper1).stream().map(Object::toString).toList();
|
||||
|
||||
if (CollUtil.isEmpty(ids)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
Set<String> result = new HashSet<>();
|
||||
// 把父亲节点加上
|
||||
for (String id : ids) {
|
||||
EdFileInfo file = edFileInfoMapper.selectById(id);
|
||||
List<EdFileInfo> edFileInfos = edFileInfoMapper.selectList(Wrappers.lambdaQuery(EdFileInfo.class).in(EdFileInfo::getId, ids));
|
||||
for (EdFileInfo file : edFileInfos) {
|
||||
String[] parentIds = file.getFilePath().split("_");
|
||||
result.addAll(Arrays.asList(parentIds));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,7 +166,8 @@
|
|||
where r.id in (select ur.role_id
|
||||
from ed_users u
|
||||
left join ed_user_role ur on u.id = ur.user_id
|
||||
where u.id = #{userId} and ur.effect_flag = 1)
|
||||
where u.id = #{userId}
|
||||
and ur.effect_flag = 1)
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1 +1,5 @@
|
|||
function r(o){throw new Error('Could not dynamically require "'+o+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}export{r as c};
|
||||
function r(o) {
|
||||
throw new Error('Could not dynamically require "' + o + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')
|
||||
}
|
||||
|
||||
export {r as c};
|
||||
|
|
|
|||
|
|
@ -1 +1,6 @@
|
|||
const s=(t,r)=>{const o=t.__vccOpts||t;for(const[c,e]of r)o[c]=e;return o};export{s as _};
|
||||
const s = (t, r) => {
|
||||
const o = t.__vccOpts || t;
|
||||
for (const [c, e] of r) o[c] = e;
|
||||
return o
|
||||
};
|
||||
export {s as _};
|
||||
|
|
|
|||
|
|
@ -1 +1,7 @@
|
|||
.backup-setting-management[data-v-592b576d]{background-color:#fff;padding:16px 24px;display:flex;flex-direction:column;height:100%}
|
||||
.backup-setting-management[data-v-592b576d] {
|
||||
background-color: #fff;
|
||||
padding: 16px 24px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1,7 @@
|
|||
.file-type-management[data-v-4e509c99]{background-color:#fff;padding:16px 24px;display:flex;flex-direction:column;height:100%}
|
||||
.file-type-management[data-v-4e509c99] {
|
||||
background-color: #fff;
|
||||
padding: 16px 24px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1,7 @@
|
|||
.icon[data-v-0273bbfb]{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}
|
||||
.icon[data-v-0273bbfb] {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
vertical-align: -.15em;
|
||||
fill: currentColor;
|
||||
overflow: hidden
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1,3 @@
|
|||
.round[data-v-52b10b31]{border-radius:18px}
|
||||
.round[data-v-52b10b31] {
|
||||
border-radius: 18px
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
const t=""+new URL("not-data-Byd7gMOX.png",import.meta.url).href;export{t as n};
|
||||
const t = "" + new URL("not-data-Byd7gMOX.png", import.meta.url).href;
|
||||
export {t as n};
|
||||
|
|
|
|||
|
|
@ -1 +1,8 @@
|
|||
System.register([],(function(e,t){"use strict";return{execute:function(){e("n",""+new URL("not-data-Byd7gMOX.png",t.meta.url).href)}}}));
|
||||
System.register([], (function (e, t) {
|
||||
"use strict";
|
||||
return {
|
||||
execute: function () {
|
||||
e("n", "" + new URL("not-data-Byd7gMOX.png", t.meta.url).href)
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
|
|
|||
|
|
@ -1 +1,12 @@
|
|||
import{t as e,aY as a,cA as r}from"./index-CnBLdARH.js";function u(){const t=e(!0);return a(()=>{t.value=!0}),r(()=>{t.value=!1}),t}export{u};
|
||||
import {aY as a, cA as r, t as e} from "./index-CnBLdARH.js";
|
||||
|
||||
function u() {
|
||||
const t = e(!0);
|
||||
return a(() => {
|
||||
t.value = !0
|
||||
}), r(() => {
|
||||
t.value = !1
|
||||
}), t
|
||||
}
|
||||
|
||||
export {u};
|
||||
|
|
|
|||
|
|
@ -1 +1,9 @@
|
|||
import{aC as a,v as o,eH as t}from"./index-CnBLdARH.js";const l=()=>{const e=a(!1);return o(()=>{e.value=t()}),e};export{l as u};
|
||||
import {aC as a, eH as t, v as o} from "./index-CnBLdARH.js";
|
||||
|
||||
const l = () => {
|
||||
const e = a(!1);
|
||||
return o(() => {
|
||||
e.value = t()
|
||||
}), e
|
||||
};
|
||||
export {l as u};
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ self.addEventListener('message', async function (event) {
|
|||
})
|
||||
|
||||
self.addEventListener('fetch', function (event) {
|
||||
const { request } = event
|
||||
const {request} = event
|
||||
|
||||
// Bypass navigation requests.
|
||||
if (request.mode === 'navigate') {
|
||||
|
|
@ -185,7 +185,7 @@ async function resolveMainClient(event) {
|
|||
}
|
||||
|
||||
async function getResponse(event, client, requestId) {
|
||||
const { request } = event
|
||||
const {request} = event
|
||||
|
||||
// Clone the request because it might've been already used
|
||||
// (i.e. its body has been read and sent to the client).
|
||||
|
|
@ -199,7 +199,7 @@ async function getResponse(event, client, requestId) {
|
|||
// Some servers forbid unknown request headers.
|
||||
delete headers['x-msw-intention']
|
||||
|
||||
return fetch(requestClone, { headers })
|
||||
return fetch(requestClone, {headers})
|
||||
}
|
||||
|
||||
// Bypass mocking when the client is not active.
|
||||
|
|
|
|||
|
|
@ -1,10 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Created with Vectornator (http://vectornator.io/) -->
|
||||
<svg height="100%" stroke-miterlimit="10" style="fill-rule:nonzero;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;" version="1.1" viewBox="31 31 450 450" width="100%" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<svg height="100%" stroke-miterlimit="10"
|
||||
style="fill-rule:nonzero;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;" version="1.1"
|
||||
viewBox="31 31 450 450" width="100%" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<defs/>
|
||||
<g id="图层-1">
|
||||
<path d="M71.7162 480.951C245.442 476.178 386.182 360.591 424.806 237.032C433.072 210.6 428.265 188.187 407.178 174.42C397.044 167.804 393.006 171.672 385.839 175.233C380.422 177.925 373.922 182.241 379.097 187.137C382.615 190.465 380.668 194.9 379.363 197.573C375.125 206.224 355.105 205.326 334.648 195.56C314.192 185.793 301.05 170.855 305.297 162.204C308.269 156.139 318.139 154.402 332.173 157.868C339.807 159.753 341.653 156.992 343.845 153.691C347.933 147.536 345.196 145.675 341.891 144.204C333.356 140.404 321.576 138.261 309.985 137.735C145.144 133.229 267.528 285.847 51.8973 427.303C33.8726 436.816 7.71038 482.711 71.7162 480.951Z" fill="#f0322d" fill-rule="nonzero" opacity="1" stroke="none"/>
|
||||
<path d="M356.231 185.86C360.69 183.864 365.088 181.629 369.434 179.183C376.947 174.899 384.181 170.153 391.092 164.973C433.422 133.468 465.071 92.5206 477.548 73.7696C481.013 68.5621 482.62 57.4866 478.761 52.105C469.108 38.6429 449.136 31.9566 431.287 31.081C423.477 30.6979 415.771 31.6629 408.83 34.2076C405.923 35.2737 400.017 38.9675 398.218 50.6922C391.564 94.0823 368.434 127.479 353.408 149.769C349.45 155.652 345.898 160.541 342.996 164.35C341.599 166.185 338.313 170.011 335.256 172.935C332.41 175.658 332.712 180.687 336.496 183.727C341.343 187.62 351.538 187.958 356.231 185.86Z" fill="#6ec83c" fill-rule="nonzero" opacity="1" stroke="none"/>
|
||||
<g id="图层-1">
|
||||
<path d="M71.7162 480.951C245.442 476.178 386.182 360.591 424.806 237.032C433.072 210.6 428.265 188.187 407.178 174.42C397.044 167.804 393.006 171.672 385.839 175.233C380.422 177.925 373.922 182.241 379.097 187.137C382.615 190.465 380.668 194.9 379.363 197.573C375.125 206.224 355.105 205.326 334.648 195.56C314.192 185.793 301.05 170.855 305.297 162.204C308.269 156.139 318.139 154.402 332.173 157.868C339.807 159.753 341.653 156.992 343.845 153.691C347.933 147.536 345.196 145.675 341.891 144.204C333.356 140.404 321.576 138.261 309.985 137.735C145.144 133.229 267.528 285.847 51.8973 427.303C33.8726 436.816 7.71038 482.711 71.7162 480.951Z"
|
||||
fill="#f0322d" fill-rule="nonzero" opacity="1" stroke="none"/>
|
||||
<path d="M356.231 185.86C360.69 183.864 365.088 181.629 369.434 179.183C376.947 174.899 384.181 170.153 391.092 164.973C433.422 133.468 465.071 92.5206 477.548 73.7696C481.013 68.5621 482.62 57.4866 478.761 52.105C469.108 38.6429 449.136 31.9566 431.287 31.081C423.477 30.6979 415.771 31.6629 408.83 34.2076C405.923 35.2737 400.017 38.9675 398.218 50.6922C391.564 94.0823 368.434 127.479 353.408 149.769C349.45 155.652 345.898 160.541 342.996 164.35C341.599 166.185 338.313 170.011 335.256 172.935C332.41 175.658 332.712 180.687 336.496 183.727C341.343 187.62 351.538 187.958 356.231 185.86Z"
|
||||
fill="#6ec83c" fill-rule="nonzero" opacity="1" stroke="none"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
|
@ -1,18 +1,18 @@
|
|||
<!doctype html>
|
||||
<html lang="zh-cn">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta content="width=device-width,initial-scale=1" name="viewport"/>
|
||||
<title>chili3d</title>
|
||||
<link rel="icon" href="favicon.svg" />
|
||||
<link rel="stylesheet" href="index.css" />
|
||||
</head>
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<script src="./iconfont.js"></script>
|
||||
<link href="favicon.svg" rel="icon"/>
|
||||
<link href="index.css" rel="stylesheet"/>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<script src="./iconfont.js"></script>
|
||||
|
||||
<script defer src="main.js"></script>
|
||||
<script>
|
||||
<script defer src="main.js"></script>
|
||||
<script>
|
||||
function jsonToBlob(json) {
|
||||
var textEncoder = new TextEncoder()
|
||||
var seen = new WeakSet()
|
||||
|
|
@ -92,6 +92,7 @@
|
|||
|
||||
return new Blob([buffer.subarray(0, position)])
|
||||
}
|
||||
|
||||
function getFileFromUrl(url, fileName) {
|
||||
return new Promise((resolve, reject) => {
|
||||
var blob = null
|
||||
|
|
@ -102,7 +103,7 @@
|
|||
xhr.onload = () => {
|
||||
// 获取返回结果
|
||||
blob = xhr.response
|
||||
var file = new File([blob], fileName, { type: blob.type })
|
||||
var file = new File([blob], fileName, {type: blob.type})
|
||||
// 返回结果
|
||||
resolve(file)
|
||||
}
|
||||
|
|
@ -146,23 +147,26 @@
|
|||
}
|
||||
|
||||
function createURLFromString(text) {
|
||||
var blob = new Blob([text], { type: 'text/plain' })
|
||||
var blob = new Blob([text], {type: 'text/plain'})
|
||||
return URL.createObjectURL(blob)
|
||||
}
|
||||
|
||||
function createURLFromJson(json) {
|
||||
var blob
|
||||
try {
|
||||
var text = JSON.stringify(json)
|
||||
var blob = new Blob([text], { type: 'text/plain' })
|
||||
var blob = new Blob([text], {type: 'text/plain'})
|
||||
} catch (e) {
|
||||
blob = jsonToBlob(json)
|
||||
}
|
||||
return URL.createObjectURL(blob)
|
||||
}
|
||||
|
||||
function createURLFromArrayBuffer(arrayBuffer) {
|
||||
var blob = new Blob([arrayBuffer], { type: 'text/plain' })
|
||||
var blob = new Blob([arrayBuffer], {type: 'text/plain'})
|
||||
return URL.createObjectURL(blob)
|
||||
}
|
||||
|
||||
function lineSegments2ToLine(line) {
|
||||
// 创建一个常规的 LineSegments 对象
|
||||
var tempLine = new window.THREE.LineSegments(
|
||||
|
|
@ -182,6 +186,7 @@
|
|||
|
||||
return tempLine
|
||||
}
|
||||
|
||||
Promise.all([
|
||||
new Promise(resolve => {
|
||||
window.onload = function () {
|
||||
|
|
@ -199,14 +204,14 @@
|
|||
new Promise(resolve => {
|
||||
window.addEventListener(
|
||||
'message',
|
||||
({ data }) => {
|
||||
({data}) => {
|
||||
resolve(data)
|
||||
},
|
||||
false,
|
||||
)
|
||||
}),
|
||||
])
|
||||
.then(([myDocument, { url: modelURL, filename }]) => {
|
||||
.then(([myDocument, {url: modelURL, filename}]) => {
|
||||
return getFileFromUrl(
|
||||
modelURL,
|
||||
filename || modelURL.split('/').pop(),
|
||||
|
|
@ -244,7 +249,7 @@
|
|||
var json = group.toJSON()
|
||||
// var url = createURLFromString(JSON.stringify(json, null, 2))
|
||||
var url = createURLFromJson(json)
|
||||
window.parent.postMessage({ gltf: url })
|
||||
window.parent.postMessage({gltf: url})
|
||||
// return exportGLTF(
|
||||
// myDocument.visual.scene.children.filter(
|
||||
// object => !object.isLight && object.type !== 'AxesHelper',
|
||||
|
|
@ -271,8 +276,8 @@
|
|||
})
|
||||
.catch(e => {
|
||||
console.log(e)
|
||||
window.parent.postMessage({ error: e.message || e })
|
||||
window.parent.postMessage({error: e.message || e})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,24 @@
|
|||
<!doctype html><html lang="zh-cn"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="description" content="chili3d"><meta name="author" content="仙阁"><title>chili3d</title><link rel="icon" href="favicon.svg"><link rel="stylesheet" href="index.css"><script>!function(t,e,n,c,r,a,i){t[n]=t[n]||function(){(t[n].q=t[n].q||[]).push(arguments)},(a=e.createElement(c)).async=1,a.src="https://www.clarity.ms/tag/"+r,(i=e.getElementsByTagName(c)[0]).parentNode.insertBefore(a,i)}(window,document,"clarity","script","k1qrtibhcl")</script></head><body><noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<script src="./iconfont.js"></script>
|
||||
<!doctype html>
|
||||
<html lang="zh-cn">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta content="width=device-width,initial-scale=1" name="viewport">
|
||||
<meta content="chili3d" name="description">
|
||||
<meta content="仙阁" name="author">
|
||||
<title>chili3d</title>
|
||||
<link href="favicon.svg" rel="icon">
|
||||
<link href="index.css" rel="stylesheet">
|
||||
<script>!function (t, e, n, c, r, a, i) {
|
||||
t[n] = t[n] || function () {
|
||||
(t[n].q = t[n].q || []).push(arguments)
|
||||
}, (a = e.createElement(c)).async = 1, a.src = "https://www.clarity.ms/tag/" + r, (i = e.getElementsByTagName(c)[0]).parentNode.insertBefore(a, i)
|
||||
}(window, document, "clarity", "script", "k1qrtibhcl")</script>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<script src="./iconfont.js"></script>
|
||||
|
||||
|
||||
<script defer src="main.js"></script></body></html>
|
||||
<script defer src="main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,19 +1,42 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<link href="/favicon.ico" rel="icon"/>
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
||||
<title>商飞数据库后台管理系统</title>
|
||||
<script type="module" crossorigin src="/assets/index-CnBLdARH.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-DVJlCBDm.css">
|
||||
<script type="module">import.meta.url;import("_").catch(()=>1);(async function*(){})().next();if(location.protocol!="file:"){window.__vite_is_modern_browser=true}</script>
|
||||
<script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy chunks, syntax error above and the same error below should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
|
||||
<script nomodule crossorigin id="vite-legacy-polyfill" src="/assets/polyfills-legacy-vTdn31Iz.js"></script>
|
||||
<script nomodule crossorigin id="vite-legacy-entry" data-src="/assets/index-legacy-BU4eSv88.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
|
||||
</body>
|
||||
<script crossorigin src="/assets/index-CnBLdARH.js" type="module"></script>
|
||||
<link crossorigin href="/assets/index-DVJlCBDm.css" rel="stylesheet">
|
||||
<script type="module">import.meta.url;
|
||||
import("_").catch(() => 1);
|
||||
(async function* () {
|
||||
})().next();
|
||||
if (location.protocol != "file:") {
|
||||
window.__vite_is_modern_browser = true
|
||||
}</script>
|
||||
<script type="module">!function () {
|
||||
if (window.__vite_is_modern_browser) return;
|
||||
console.warn("vite: loading legacy chunks, syntax error above and the same error below should be ignored");
|
||||
var e = document.getElementById("vite-legacy-polyfill"), n = document.createElement("script");
|
||||
n.src = e.src, n.onload = function () {
|
||||
System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))
|
||||
}, document.body.appendChild(n)
|
||||
}();</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script nomodule>!function () {
|
||||
var e = document, t = e.createElement("script");
|
||||
if (!("noModule" in t) && "onbeforeload" in t) {
|
||||
var n = !1;
|
||||
e.addEventListener("beforeload", (function (e) {
|
||||
if (e.target === t) n = !0; else if (!e.target.hasAttribute("nomodule") || !n) return;
|
||||
e.preventDefault()
|
||||
}), !0), t.type = "module", t.src = ".", e.head.appendChild(t), t.remove()
|
||||
}
|
||||
}();</script>
|
||||
<script crossorigin id="vite-legacy-polyfill" nomodule src="/assets/polyfills-legacy-vTdn31Iz.js"></script>
|
||||
<script crossorigin data-src="/assets/index-legacy-BU4eSv88.js" id="vite-legacy-entry"
|
||||
nomodule>System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,38 +1,15 @@
|
|||
//import com.electromagnetic.industry.software.manage.Application;
|
||||
//import jakarta.annotation.Resource;
|
||||
//import org.junit.jupiter.api.Test;
|
||||
//import org.springframework.ai.document.Document;
|
||||
//import org.springframework.ai.document.DocumentReader;
|
||||
//import org.springframework.ai.reader.TextReader;
|
||||
//import org.springframework.ai.transformer.splitter.TokenTextSplitter;
|
||||
//import org.springframework.ai.vectorstore.VectorStore;
|
||||
//import org.springframework.boot.test.context.SpringBootTest;
|
||||
//
|
||||
//import java.io.File;
|
||||
//import java.net.MalformedURLException;
|
||||
//import java.nio.file.Path;
|
||||
//import java.util.List;
|
||||
//
|
||||
//@SpringBootTest(classes = Application.class)
|
||||
//public class Test1 {
|
||||
//
|
||||
// @Resource
|
||||
// private VectorStore vectorStore;
|
||||
//
|
||||
// @Test
|
||||
// public void testTree() throws MalformedURLException {
|
||||
// String path = "D:/明朝那些事儿.txt";
|
||||
// File file = new File(path);
|
||||
// Path tempFile = file.toPath();
|
||||
// DocumentReader documentReader = new TextReader(String.valueOf(tempFile.toUri().toURL()));
|
||||
// List<Document> documents = new TokenTextSplitter().apply(documentReader.get());
|
||||
// documents = documents.subList(0, 200);
|
||||
// vectorStore.write(documents);
|
||||
//
|
||||
/// / Path tempFile = Paths.get(file.getAbsolutePath());
|
||||
/// / DocumentReader documentReader = new TextReader(String.valueOf(tempFile.toUri().toURL()));
|
||||
/// / List<Document> documents = documentReader.get();
|
||||
/// / vectorStore.write(documents);
|
||||
// }
|
||||
//
|
||||
//}
|
||||
import com.electromagnetic.industry.software.manage.Application;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
|
||||
@SpringBootTest(classes = Application.class)
|
||||
public class Test1 {
|
||||
|
||||
@Test
|
||||
public void test() throws MalformedURLException {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue