diff --git a/electron.vite.config.mjs b/electron.vite.config.mjs
index 06f4a44..1daadd5 100644
--- a/electron.vite.config.mjs
+++ b/electron.vite.config.mjs
@@ -48,10 +48,10 @@ export default defineConfig({
changeOrigin: true, // 改变请求的起源
rewrite: (path) => path.replace(/^\/parth/, '') // 重写路径
},
- '/v1': {
+ '/api': {
target: 'https://ai.ysaix.com:7864',
changeOrigin: true,
- pathRewrite: { '^/v1': '' }
+ pathRewrite: { '^/api': '' }
}
},
},
diff --git a/package.json b/package.json
index 69ded97..249f906 100644
--- a/package.json
+++ b/package.json
@@ -33,14 +33,18 @@
"@electron-toolkit/utils": "^3.0.0",
"@electron/remote": "^2.1.2",
"@element-plus/icons-vue": "^2.3.1",
+ "@icon-park/vue-next": "^1.4.2",
"@vitejs/plugin-vue-jsx": "^4.0.0",
"@vue-office/docx": "^1.6.2",
"@vue-office/excel": "^1.7.11",
"@vue-office/pdf": "^2.0.2",
"@vueuse/core": "^10.11.0",
+ "animate.css": "^4.1.1",
"circular-json": "^0.5.9",
+ "clipboard": "^2.0.11",
"cropperjs": "^1.6.2",
"crypto-js": "^4.2.0",
+ "dexie": "3.0.3",
"echarts": "^5.5.1",
"electron-dl-manager": "^3.0.0",
"electron-log": "^5.1.7",
@@ -49,6 +53,9 @@
"element-china-area-data": "^6.1.0",
"element-plus": "^2.8.0",
"fabric": "^5.3.0",
+ "file-saver": "^2.0.5",
+ "hfmath": "^0.0.2",
+ "html-to-image": "^1.11.11",
"im_electron_sdk": "^8.0.5904",
"js-cookie": "^3.0.5",
"jsencrypt": "^3.3.2",
@@ -56,28 +63,13 @@
"less": "^4.2.0",
"less-loader": "^7.3.0",
"lodash": "^4.17.21",
+ "mitt": "^3.0.1",
+ "nanoid": "^5.0.7",
"node-addon-api": "^8.1.0",
+ "number-precision": "^1.6.0",
"pdfjs-dist": "4.4.168",
"pinia": "^2.1.7",
"pinia-plugin-persistedstate": "^3.2.1",
- "spark-md5": "^3.0.2",
- "vite-plugin-electron": "^0.28.8",
- "vue-qr": "^4.0.9",
- "vue-router": "^4.4.0",
- "whiteboard_lyc": "^0.1.3",
- "xgplayer": "^3.0.19",
- "xlsx": "^0.18.5",
-
- "@icon-park/vue-next": "^1.4.2",
- "animate.css": "^4.1.1",
- "clipboard": "^2.0.11",
- "dexie": "3.0.3",
- "file-saver": "^2.0.5",
- "hfmath": "^0.0.2",
- "html-to-image": "^1.11.11",
- "mitt": "^3.0.1",
- "nanoid": "^5.0.7",
- "number-precision": "^1.6.0",
"pptxgenjs": "^3.12.0",
"pptxtojson": "^1.0.3",
"prosemirror-commands": "^1.6.0",
@@ -91,33 +83,25 @@
"prosemirror-schema-list": "^1.4.1",
"prosemirror-state": "^1.4.3",
"prosemirror-view": "^1.33.9",
+ "spark-md5": "^3.0.2",
"svg-arc-to-cubic-bezier": "^3.2.0",
"svg-pathdata": "^7.1.0",
"tinycolor2": "^1.6.0",
"tippy.js": "^6.3.7",
+ "vite-plugin-electron": "^0.28.8",
"vue": "^3.4.34",
- "vuedraggable": "^4.1.0"
+ "vue-qr": "^4.0.9",
+ "vue-router": "^4.4.0",
+ "vuedraggable": "^4.1.0",
+ "whiteboard_lyc": "^0.1.3",
+ "xgplayer": "^3.0.19",
+ "xlsx": "^0.18.5"
},
"devDependencies": {
- "@electron-toolkit/eslint-config": "^1.0.2",
- "@rushstack/eslint-patch": "^1.10.3",
- "@vitejs/plugin-vue": "^5.0.5",
- "@vue/eslint-config-prettier": "^9.0.0",
- "axios": "^1.7.2",
- "electron": "^31.0.2",
- "electron-builder": "^24.13.3",
- "electron-vite": "^2.3.0",
- "eslint": "^8.57.0",
- "eslint-plugin-vue": "^9.26.0",
- "prettier": "^3.3.2",
- "sass": "^1.77.6",
- "vite": "^5.3.1",
- "vite-plugin-windicss": "^1.9.3",
- "vue": "^3.4.30",
- "windicss": "^3.5.6",
-
"@commitlint/cli": "^18.4.3",
"@commitlint/config-conventional": "^18.4.3",
+ "@electron-toolkit/eslint-config": "^1.0.2",
+ "@rushstack/eslint-patch": "^1.10.3",
"@tsconfig/node18": "^18.2.2",
"@types/crypto-js": "^4.2.1",
"@types/file-saver": "^2.0.7",
@@ -125,11 +109,25 @@
"@types/node": "^18.19.3",
"@types/svg-arc-to-cubic-bezier": "^3.2.2",
"@types/tinycolor2": "^1.4.6",
+ "@vitejs/plugin-vue": "^5.0.5",
+ "@vue/eslint-config-prettier": "^9.0.0",
"@vue/eslint-config-typescript": "^12.0.0",
"@vue/tsconfig": "^0.5.0",
+ "axios": "^1.7.2",
+ "electron": "^31.0.2",
+ "electron-builder": "^24.13.3",
+ "electron-vite": "^2.3.0",
+ "eslint": "^8.57.0",
+ "eslint-plugin-vue": "^9.26.0",
"husky": "^8.0.3",
"npm-run-all2": "^6.1.1",
+ "prettier": "^3.3.2",
+ "sass": "^1.77.6",
"typescript": "~5.3.0",
- "vue-tsc": "^1.8.25"
+ "vite": "^5.3.1",
+ "vite-plugin-windicss": "^1.9.3",
+ "vue": "^3.4.30",
+ "vue-tsc": "^1.8.25",
+ "windicss": "^3.5.6"
}
}
diff --git a/src/renderer/src/api/mode/index.js b/src/renderer/src/api/mode/index.js
index 51448f2..5af6b1a 100644
--- a/src/renderer/src/api/mode/index.js
+++ b/src/renderer/src/api/mode/index.js
@@ -26,10 +26,10 @@ export function conversation(data) {
// 进行课标研读对话
export function completion(data) {
return axios({
- url: rootPath + '/v1/api/completion',
+ url: rootPath + '/api/v1/parse/docs',
method: 'post',
headers: {
- Authorization: 'Bearer ragflow-IwNzMxMTIyOGY0ZTExZWZiOGE2MDI0Mm',
+ Authorization: 'Bearer ragflow-IwMDI1MGU2YTU3NjExZWZiNWEzMDI0Mm',
'Content-Type': 'application/json',
Accept: '*/*'
},
diff --git a/src/renderer/src/components/template-study/container/adjust-dialog.vue b/src/renderer/src/components/template-study/container/adjust-dialog.vue
index 77e2e6c..0258471 100644
--- a/src/renderer/src/components/template-study/container/adjust-dialog.vue
+++ b/src/renderer/src/components/template-study/container/adjust-dialog.vue
@@ -44,6 +44,7 @@ import { ref, reactive, onMounted } from 'vue'
import { conversation, completion } from '@/api/mode/index'
import { sessionStore } from '@/utils/store'
import { ElMessage } from 'element-plus'
+import { dataSetJson } from '@/utils/comm.js'
const textarea = ref('')
@@ -55,6 +56,10 @@ const props = defineProps({
default: () => {
return { name: '11' }
}
+ },
+ modeType: {
+ type: Number,
+ default: 1
}
})
@@ -77,31 +82,22 @@ const send = () =>{
const curNode = reactive({})
const params = reactive(
{
- "conversation_id": "",
- "messages": [
- {
- "role": "user",
- "content": ""
- }
- ],
- "quote": false,
- "stream": false
+ prompt: '',
+ dataset_id: ''
}
)
// 获取会话ID
-const getConversation = async (val) => {
- const result = await conversation()
- params.conversation_id = result.data.data.id
+const getConversation = (val) => {
+
getCompletion(val)
}
// 大模型对话
const getCompletion = async (val) => {
try {
- params.messages[0].content = `根据${curNode.edustage}语文课标${props.item.name},${val}`
- const res = await completion(params)
- console.log('对话结果===》', res)
- let answer = res.data.data.answer
+ params.prompt = `根据${curNode.edustage}${curNode.edusubject}课标${props.item.name},${val}`
+ const { data } = await completion(params)
+ let answer = data.answer
msgList.value.push({
type: 'robot',
msg: answer,
@@ -121,7 +117,11 @@ const saveAdjust = (item) =>{
onMounted(() => {
let data = sessionStore.get('subject.curNode')
Object.assign(curNode, data);
-
+ let text = props.modeType == 1 ? '课标': props.modeType == 2 ? '教材' : '考试'
+
+ let jsonKey = `${text}-${data.edustage}-${data.edusubject}`
+ params.dataset_id = dataSetJson[jsonKey]
+
})
diff --git a/src/renderer/src/components/template-study/container/edit-dialog.vue b/src/renderer/src/components/template-study/container/edit-dialog.vue
index 852c78b..f8b8172 100644
--- a/src/renderer/src/components/template-study/container/edit-dialog.vue
+++ b/src/renderer/src/components/template-study/container/edit-dialog.vue
@@ -42,7 +42,7 @@ const props = defineProps({
}
})
-watch(() => props.item.oldAnswer, (newVal) => {
+watch(() => props.item.answer, (newVal) => {
if (newVal) {
textarea.value = newVal
}
diff --git a/src/renderer/src/components/template-study/container/result.vue b/src/renderer/src/components/template-study/container/result.vue
index a8fe11d..a685aae 100644
--- a/src/renderer/src/components/template-study/container/result.vue
+++ b/src/renderer/src/components/template-study/container/result.vue
@@ -55,7 +55,7 @@