diff --git a/src/renderer/src/api/aiGeneratedImage/index.js b/src/renderer/src/api/aiGeneratedImage/index.js new file mode 100644 index 0000000..9939c5d --- /dev/null +++ b/src/renderer/src/api/aiGeneratedImage/index.js @@ -0,0 +1,81 @@ +import axios from 'axios' +import request from '@/utils/request' +import { getToken } from "@/utils/auth"; + +// 文生图片 +export function convertTextToPicture(data) { + return axios({ + url: 'https://ai.ysaix.com:7853/prompt', + method: 'post', + headers: { + 'Content-Type': 'application/json', + 'Accept': '*/*' + }, + data: data + }) +} +// 获取任务列表 +export function getQueue() { + return axios({ + url: `https://ai.ysaix.com:7853/queue`, + method: 'get', + }) +} + +// 获取生图任务id +export function getPromptId(id) { + return axios({ + url: `https://ai.ysaix.com:7853/history/${id}`, + method: 'get', + }) +} + +// 获取生成图片路径 +export function getPicture(data) { + return axios({ + url: 'https://ai.ysaix.com:7853/view', + method: 'get', + params: data + }) +} + +// 大模型对话生成prompt模板 +export function chattoprompt(dataset_id,prompt) { + return axios({ + url: '/api/v1/parse/docs', + method: 'post', + headers: { + 'Authorization': 'Bearer ragflow-IwMDI1MGU2YTU3NjExZWZiNWEzMDI0Mm', + }, + data: { + 'dataset_id': dataset_id, + 'prompt': prompt + } + }) +} + +// prompt敏感词校验 +export function textSensitiveWord(data) { + return request({ + url: '/verify/text', + method: 'post', + data: { + 'text' : data + } + }) + } + + // 图片上传资源库 + export function uploadPicture(data) { + return axios({ + url: '/dev-api/smarttalk/file/upload', + method: 'post', + headers: { + 'Accept': '*/*', + 'Content-Type': 'multipart/form-data', + 'Authorization': "Bearer " + getToken() + }, + data: data + }) + } + \ No newline at end of file diff --git a/src/renderer/src/api/education/entpCourseWork.js b/src/renderer/src/api/education/entpCourseWork.js index 04582ba..25f61e2 100644 --- a/src/renderer/src/api/education/entpCourseWork.js +++ b/src/renderer/src/api/education/entpCourseWork.js @@ -9,6 +9,16 @@ export function listEntpcoursework(query) { }) } + +// 查询entpcoursework列表 +export function listEntpcourseworkLocal(query) { + return request({ + url: '/education/entpcoursework/local/list', + method: 'get', + params: query + }) +} + // 查询entpcoursework详细 export function getEntpcoursework(id) { return request({ diff --git a/src/renderer/src/components/ai-kolors/index.vue b/src/renderer/src/components/ai-kolors/index.vue new file mode 100644 index 0000000..0d70f0f --- /dev/null +++ b/src/renderer/src/components/ai-kolors/index.vue @@ -0,0 +1,627 @@ + + + + + \ No newline at end of file diff --git a/src/renderer/src/components/set-homework/index.vue b/src/renderer/src/components/set-homework/index.vue index b890ff3..8f2db6b 100644 --- a/src/renderer/src/components/set-homework/index.vue +++ b/src/renderer/src/components/set-homework/index.vue @@ -41,7 +41,7 @@ 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 35de365..5cf6251 100644 --- a/src/renderer/src/components/template-study/container/adjust-dialog.vue +++ b/src/renderer/src/components/template-study/container/adjust-dialog.vue @@ -1,5 +1,5 @@