feat(知识库): 增加知识库模块
@@ -8,28 +8,6 @@ spring.boot.admin.client:
|
||||
username: ruoyi
|
||||
password: 123456
|
||||
|
||||
--- # xxl-job 配置
|
||||
xxl.job:
|
||||
# 执行器开关
|
||||
enabled: false
|
||||
# 调度中心地址:如调度中心集群部署存在多个地址则用逗号分隔。
|
||||
admin-addresses: http://localhost:9100/xxl-job-admin
|
||||
# 执行器通讯TOKEN:非空时启用
|
||||
access-token: xxl-job
|
||||
executor:
|
||||
# 执行器AppName:执行器心跳注册分组依据;为空则关闭自动注册
|
||||
appname: xxl-job-executor
|
||||
# 执行器端口号 执行器从9101开始往后写
|
||||
port: 9101
|
||||
# 执行器注册:默认IP:PORT
|
||||
address:
|
||||
# 执行器IP:默认自动获取IP
|
||||
ip:
|
||||
# 执行器运行日志文件存储磁盘路径
|
||||
logpath: ./logs/xxl-job
|
||||
# 执行器日志文件保存天数:大于3生效
|
||||
logretentiondays: 30
|
||||
|
||||
--- # 数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
@@ -49,7 +27,8 @@ spring:
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://43.139.70.230:3306/ruoyi-ai?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
|
||||
username: ruoyi-ai
|
||||
password: TZ7yaGtSRWeeBaBJ
|
||||
password: eCaZ278N62k6fhYj
|
||||
|
||||
hikari:
|
||||
# 最大连接池数量
|
||||
maxPoolSize: 20
|
||||
@@ -78,7 +57,7 @@ spring.data:
|
||||
# 数据库索引
|
||||
database: 0
|
||||
# 密码(如没有密码请注释掉)
|
||||
#password:
|
||||
# password: 123456
|
||||
# 连接超时时间
|
||||
timeout: 10S
|
||||
# 是否开启ssl
|
||||
|
||||
@@ -6,7 +6,7 @@ ruoyi:
|
||||
# 版本
|
||||
version: ${revision}
|
||||
# 版权年份
|
||||
copyrightYear: 2023
|
||||
copyrightYear: 2025
|
||||
# 实例演示开关
|
||||
demoEnabled: true
|
||||
# 获取ip地址开关
|
||||
@@ -294,7 +294,7 @@ management:
|
||||
websocket:
|
||||
enabled: true
|
||||
# 路径
|
||||
path: ''
|
||||
path: '/resource/websocket'
|
||||
# 设置访问源地址
|
||||
allowedOrigins: '*'
|
||||
|
||||
@@ -308,28 +308,34 @@ wx:
|
||||
aesKey: #微信小程序消息服务器配置的EncodingAESKey
|
||||
msgDataFormat: JSON
|
||||
|
||||
# 企业微信应用
|
||||
wechat:
|
||||
# 是否使用微信 true/false
|
||||
enable: true
|
||||
# 生成的登录二维码路径 默认与项目同级
|
||||
qrPath: "./"
|
||||
# 企业微信应用
|
||||
cp:
|
||||
corpId:
|
||||
appConfigs:
|
||||
- agentId:
|
||||
secret: ''
|
||||
token: ''
|
||||
aesKey: ''
|
||||
|
||||
# 知识库配置
|
||||
chain:
|
||||
split:
|
||||
chunk:
|
||||
endspliter: "<STOP>"
|
||||
# 分块文本大小
|
||||
size: 500
|
||||
overlay: 0
|
||||
qaspliter: "######"
|
||||
size: 200
|
||||
overlay: 30
|
||||
qaspliter: "###"
|
||||
# 知识库中检索的条数
|
||||
limits: 5
|
||||
vectorization:
|
||||
type: openai
|
||||
openai:
|
||||
model: 'text-embedding-3-small'
|
||||
baidu:
|
||||
model: bge-large-zh
|
||||
zhipu:
|
||||
model: embedding-2
|
||||
# 智普API KEY
|
||||
token: xx
|
||||
vector:
|
||||
model: 'text-embedding-3-small'
|
||||
store:
|
||||
type: weaviate
|
||||
weaviate:
|
||||
@@ -341,38 +347,4 @@ chain:
|
||||
port: 19530
|
||||
dimension: 1536
|
||||
collection: LocalKnowledge
|
||||
llm:
|
||||
openai:
|
||||
token: sk-xx
|
||||
model: gpt-4-1106-preview
|
||||
chatglm:
|
||||
baseurl: http://127.0.0.1:8000/
|
||||
model: chatglm2-6b
|
||||
baidu:
|
||||
appKey: xx
|
||||
secretKey: xx
|
||||
model: ernie_bot
|
||||
zhipu:
|
||||
model: glm-4
|
||||
audio:
|
||||
type: openai
|
||||
text:
|
||||
type: openai
|
||||
function:
|
||||
type: baidu
|
||||
vision:
|
||||
type: openai
|
||||
image:
|
||||
type: openai
|
||||
|
||||
upload:
|
||||
path: /data/upload
|
||||
|
||||
proxy:
|
||||
socket:
|
||||
host: 127.0.0.1
|
||||
port: 7890
|
||||
|
||||
resource:
|
||||
domain: http://127.0.0.1:${server.port}/resources
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 469 KiB |
@@ -1,8 +0,0 @@
|
||||
@font-face {font-family: "Engravers' Old English BT";
|
||||
src: url("https://unpkg.com/dmego-home-page@latest/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.eot"); /* IE9*/
|
||||
src: url("https://unpkg.com/dmego-home-page@latest/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
|
||||
url("https://unpkg.com/dmego-home-page@latest/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.woff2") format("woff2"), /* chrome firefox */
|
||||
url("https://unpkg.com/dmego-home-page@latest/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.woff") format("woff"), /* chrome firefox */
|
||||
url("https://unpkg.com/dmego-home-page@latest/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.ttf") format("truetype"), /* chrome firefox opera Safari, Android, iOS 4.2+*/
|
||||
url("https://unpkg.com/dmego-home-page@latest/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.svg#Engravers' Old English BT") format("svg"); /* iOS 4.1- */
|
||||
}
|
||||
|
Before Width: | Height: | Size: 148 KiB |
|
Before Width: | Height: | Size: 251 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 134 KiB |
|
Before Width: | Height: | Size: 115 KiB |
@@ -1,38 +0,0 @@
|
||||
const https = require('https')
|
||||
const fs = require('fs')
|
||||
|
||||
const options = {
|
||||
hostname: 'www.bing.com',
|
||||
port: 443,
|
||||
path: '/HPImageArchive.aspx?format=js&idx=0&n=8',
|
||||
method: 'GET'
|
||||
}
|
||||
|
||||
const req = https.request(options, bing_res => {
|
||||
let bing_body = [], bing_data = {};
|
||||
bing_res.on('data', (chunk) => {
|
||||
bing_body.push(chunk);
|
||||
});
|
||||
bing_res.on('end', () => {
|
||||
bing_body = Buffer.concat(bing_body);
|
||||
bing_data = JSON.parse(bing_body.toString());
|
||||
let img_array = bing_data.images;
|
||||
let img_url = [];
|
||||
img_array.forEach(img => {
|
||||
img_url.push(img.url);
|
||||
});
|
||||
var jsonpStr = "getBingImages(" + JSON.stringify(img_url) + ")";
|
||||
fs.writeFile('./assets/json/images.json', jsonpStr, (err) => {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
console.log("JSON data is saved: " + jsonpStr);
|
||||
});
|
||||
});
|
||||
})
|
||||
|
||||
req.on('error', error => {
|
||||
console.error(error)
|
||||
})
|
||||
|
||||
req.end()
|
||||
@@ -1,104 +0,0 @@
|
||||
var iUp = (function () {
|
||||
var time = 0,
|
||||
duration = 150,
|
||||
clean = function () {
|
||||
time = 0;
|
||||
},
|
||||
up = function (element) {
|
||||
setTimeout(function () {
|
||||
element.classList.add("up");
|
||||
}, time);
|
||||
time += duration;
|
||||
},
|
||||
down = function (element) {
|
||||
element.classList.remove("up");
|
||||
},
|
||||
toggle = function (element) {
|
||||
setTimeout(function () {
|
||||
element.classList.toggle("up");
|
||||
}, time);
|
||||
time += duration;
|
||||
};
|
||||
return {
|
||||
clean: clean,
|
||||
up: up,
|
||||
down: down,
|
||||
toggle: toggle
|
||||
};
|
||||
})();
|
||||
|
||||
function getBingImages(imgUrls) {
|
||||
/**
|
||||
* 获取Bing壁纸
|
||||
* 先使用 GitHub Action 每天获取 Bing 壁纸 URL 并更新 images.json 文件
|
||||
* 然后读取 images.json 文件中的数据
|
||||
*/
|
||||
var indexName = "bing-image-index";
|
||||
var index = sessionStorage.getItem(indexName);
|
||||
var panel = document.querySelector('#panel');
|
||||
if (isNaN(index) || index == 7) index = 0;
|
||||
else index++;
|
||||
var imgUrl = imgUrls[index];
|
||||
var url = "https://www.cn.bing.com" + imgUrl;
|
||||
panel.style.background = "url('" + url + "') center center no-repeat #666";
|
||||
panel.style.backgroundSize = "cover";
|
||||
sessionStorage.setItem(indexName, index);
|
||||
}
|
||||
|
||||
function decryptEmail(encoded) {
|
||||
var address = atob(encoded);
|
||||
window.location.href = "mailto:" + address;
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
// 获取一言数据
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.onreadystatechange = function () {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
var res = JSON.parse(this.responseText);
|
||||
document.getElementById('description').innerHTML = res.hitokoto + "<br/> -「<strong>" + res.from + "</strong>」";
|
||||
}
|
||||
};
|
||||
xhr.open("GET", "https://v1.hitokoto.cn", true);
|
||||
xhr.send();
|
||||
|
||||
var iUpElements = document.querySelectorAll(".iUp");
|
||||
iUpElements.forEach(function (element) {
|
||||
iUp.up(element);
|
||||
});
|
||||
|
||||
var avatarElement = document.querySelector(".js-avatar");
|
||||
avatarElement.addEventListener('load', function () {
|
||||
avatarElement.classList.add("show");
|
||||
});
|
||||
});
|
||||
|
||||
var btnMobileMenu = document.querySelector('.btn-mobile-menu__icon');
|
||||
var navigationWrapper = document.querySelector('.navigation-wrapper');
|
||||
|
||||
btnMobileMenu.addEventListener('click', function () {
|
||||
if (navigationWrapper.style.display == "block") {
|
||||
navigationWrapper.addEventListener('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
|
||||
navigationWrapper.classList.toggle('visible');
|
||||
navigationWrapper.classList.toggle('animated');
|
||||
navigationWrapper.classList.toggle('bounceOutUp');
|
||||
navigationWrapper.removeEventListener('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', arguments.callee);
|
||||
});
|
||||
navigationWrapper.classList.toggle('animated');
|
||||
navigationWrapper.classList.toggle('bounceInDown');
|
||||
navigationWrapper.classList.toggle('animated');
|
||||
navigationWrapper.classList.toggle('bounceOutUp');
|
||||
} else {
|
||||
navigationWrapper.classList.toggle('visible');
|
||||
navigationWrapper.classList.toggle('animated');
|
||||
navigationWrapper.classList.toggle('bounceInDown');
|
||||
}
|
||||
btnMobileMenu.classList.toggle('social');
|
||||
btnMobileMenu.classList.toggle('iconfont');
|
||||
btnMobileMenu.classList.toggle('icon-list');
|
||||
btnMobileMenu.classList.toggle('social');
|
||||
btnMobileMenu.classList.toggle('iconfont');
|
||||
btnMobileMenu.classList.toggle('icon-angleup');
|
||||
btnMobileMenu.classList.toggle('animated');
|
||||
btnMobileMenu.classList.toggle('fadeIn');
|
||||
});
|
||||
@@ -1 +0,0 @@
|
||||
getBingImages(["/th?id=OHR.TheRoachesPeakDistrict_EN-US9733115206_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp","/th?id=OHR.SanMiguelAllende_EN-US9621237021_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp","/th?id=OHR.JediMonastery_EN-US9398447907_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp","/th?id=OHR.SonoranSpring_EN-US9207877073_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp","/th?id=OHR.CratersOfTheMoon_EN-US6516727783_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp","/th?id=OHR.HawaiianLei_EN-US6290126556_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp","/th?id=OHR.CheetahRain_EN-US6179670004_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp","/th?id=OHR.TulouFujian_EN-US6009679228_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp"])
|
||||
@@ -1 +0,0 @@
|
||||
<?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="1714852590465" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1571" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M263.1 844.8h497.7c22.9 0 41.5 18.6 41.5 41.5s-18.6 41.5-41.5 41.5H263.1c-22.9 0-41.5-18.6-41.5-41.5s18.6-41.5 41.5-41.5zM138.7 98.2h746.6c22.9 0 41.5 18.6 41.5 41.5v580.7c0 11-4.4 21.6-12.1 29.3-7.8 7.8-18.3 12.1-29.3 12.1H138.7c-11 0-21.6-4.4-29.3-12.1-7.8-7.8-12.1-18.3-12.1-29.3V139.7c-0.1-22.9 18.5-41.5 41.4-41.5z m331.8 478.9v60.4h83v-60.3c8.5-5.8 17.4-12.8 26.5-20.5l49.4 49.4 58.7-58.7-49.5-49.4c7.7-9 14.6-18 20.5-26.5h60.3v-83h-60.3c-6.4-9.1-13.3-18-20.5-26.5l49.4-49.4-58.7-58.6-49.4 49.4c-8.5-7.3-17.3-14.1-26.5-20.5v-60.3h-83V283c-8.5 5.8-17.4 12.8-26.5 20.5l-49.4-49.4-58.5 58.6 49.4 49.4c-7.2 8.5-14.1 17.3-20.5 26.5h-60.3v83h60.3c5.8 8.5 12.8 17.4 20.5 26.5L336 547.3l58.7 58.7 49.4-49.4c9.1 7.7 18 14.6 26.4 20.5z m0 0" p-id="1572"></path></svg>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB |