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 a5fa027..000f8e2 100644
--- a/src/renderer/src/components/template-study/container/adjust-dialog.vue
+++ b/src/renderer/src/components/template-study/container/adjust-dialog.vue
@@ -59,6 +59,7 @@ import { completion, docList } from '@/api/mode/index'
import { sessionStore } from '@/utils/store'
import { dataSetJson } from '@/utils/comm.js'
import useUserStore from '@/store/modules/user'
+import { sendChart } from '@/api/ai/index'
import emitter from '@/utils/mitt';
const userInfo = useUserStore().user
@@ -77,6 +78,14 @@ const props = defineProps({
type: {
type: Number,
default: 1
+ },
+ curMode:{
+ type: Number,
+ default: 1
+ },
+ conversation_id: {
+ type: [Number, String],
+ default: ''
}
})
@@ -100,7 +109,8 @@ const curNode = reactive({})
const params = reactive(
{
prompt: '',
- dataset_id: ''
+ dataset_id: '',
+ template: ''
}
)
@@ -108,7 +118,24 @@ const params = reactive(
const getCompletion = async (val) => {
try {
params.prompt = `按照${val}的要求,针对${curNode.edustage}${curNode.edusubject}${modeType.value} 对${curNode.itemtitle}进行教学分析`
- const { data } = await completion(params)
+ params.template = props.item.prompt
+
+ let data = null;
+ // 教学大模型
+ if(props.curMode == 1){
+ const res = await sendChart({
+ content: params.prompt,
+ conversationId: props.conversation_id,
+ stream: false
+ })
+ data = res.data
+ }
+ else{
+ // 知识库模型
+ const res = await completion(params)
+ data = res.data
+ }
+
let answer = data.answer
msgList.value.push({
type: 'robot',
diff --git a/src/renderer/src/components/template-study/container/right.vue b/src/renderer/src/components/template-study/container/right.vue
index 74a87c3..2f4b93c 100644
--- a/src/renderer/src/components/template-study/container/right.vue
+++ b/src/renderer/src/components/template-study/container/right.vue
@@ -81,7 +81,7 @@
-
+
@@ -323,7 +323,7 @@ const againResult = async (index, item) => {
let data = null;
// 教学大模型
- if (mode.value == 1) {
+ if (curMode.value == 1) {
const res = await sendChart({
content: params.prompt,
conversationId: conversation_id.value,
diff --git a/src/renderer/src/views/teachingDesign/container/adjust-dialog.vue b/src/renderer/src/views/teachingDesign/container/adjust-dialog.vue
index fd887a2..a58bbd8 100644
--- a/src/renderer/src/views/teachingDesign/container/adjust-dialog.vue
+++ b/src/renderer/src/views/teachingDesign/container/adjust-dialog.vue
@@ -42,9 +42,10 @@