diff --git a/jeecgboot-vue3/src/assets/images/ai/aiflow.png b/jeecgboot-vue3/src/assets/images/ai/aiflow.png new file mode 100644 index 00000000..49ffd3d7 Binary files /dev/null and b/jeecgboot-vue3/src/assets/images/ai/aiflow.png differ diff --git a/jeecgboot-vue3/src/views/super/airag/aiapp/AiApp.api.ts b/jeecgboot-vue3/src/views/super/airag/aiapp/AiApp.api.ts new file mode 100644 index 00000000..e24b301f --- /dev/null +++ b/jeecgboot-vue3/src/views/super/airag/aiapp/AiApp.api.ts @@ -0,0 +1,81 @@ +import { defHttp } from '/@/utils/http/axios'; +import { Modal } from 'ant-design-vue'; + +export enum Api { + //知识库管理 + list = '/airag/app/list', + save = '/airag/app/edit', + delete = '/airag/app/delete', + queryById = '/airag/app/queryById', + queryBathById = '/airag/knowledge/query/batch/byId', + queryFlowById = '/airag/flow/queryById', + promptGenerate = '/airag/app/prompt/generate', +} + +/** + * 查询应用 + * @param params + */ +export const appList = (params) => { + return defHttp.get({ url: Api.list, params }, { isTransformResponse: false }); +}; + +/** + * 查询知识库 + * @param params + */ +export const queryKnowledgeBathById = (params) => { + return defHttp.get({ url: Api.queryBathById, params }, { isTransformResponse: false }); +}; + +/** + * 根据应用id查询应用 + * @param params + */ +export const queryById = (params) => { + return defHttp.get({ url: Api.queryById, params }, { isTransformResponse: false }); +}; + +/** + * 新增应用 + * @param params + */ +export const saveApp = (params) => { + return defHttp.put({ url: Api.save, params }); +}; + +/** + * 删除应用 + * @param params + * @param handleSuccess + */ +export const deleteApp = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除名称为'+params.name+'的应用吗?', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({ url: Api.delete, params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); + }, + }); +}; + + +/** + * 根据应用id查询流程 + * @param params + */ +export const queryFlowById = (params) => { + return defHttp.get({ url: Api.queryFlowById, params }, { isTransformResponse: false }); +}; + +/** + * 应用编排 + * @param params + */ +export const promptGenerate = (params) => { + return defHttp.get({ url: Api.promptGenerate, params,timeout: 5 * 60 * 1000 }, { isTransformResponse: false }); +}; diff --git a/jeecgboot-vue3/src/views/super/airag/aiapp/AiApp.data.ts b/jeecgboot-vue3/src/views/super/airag/aiapp/AiApp.data.ts new file mode 100644 index 00000000..ef9c2532 --- /dev/null +++ b/jeecgboot-vue3/src/views/super/airag/aiapp/AiApp.data.ts @@ -0,0 +1,88 @@ +import { FormSchema } from '@/components/Form'; + +/** + * 表单 + */ +export const formSchema: FormSchema[] = [ + { + label: 'id', + field: 'id', + component: 'Input', + show: false, + }, + { + label: '应用名称', + field: 'name', + required: true, + componentProps: { + //是否展示字数 + showCount: true, + maxlength: 64, + }, + component: 'Input', + }, + { + label: '应用描述', + field: 'descr', + component: 'InputTextArea', + componentProps: { + placeholder: '描述该应用的应用场景及用途', + rows: 4, + //是否展示字数 + showCount: true, + maxlength: 256, + }, + }, + { + label: '应用图标', + field: 'icon', + component: 'JImageUpload', + }, + { + label: '选择应用类型', + field: 'type', + component: 'Input', + ifShow:({ values })=>{ + return !values.id; + }, + slot: 'typeSlot', + }, +]; + +/** + * 快捷指令表单 + */ +export const quickCommandFormSchema: FormSchema[] = [ + { + label: 'key', + field: 'key', + component: 'Input', + show: false, + }, + { + label: '按钮名称', + field: 'name', + required: true, + component: 'Input', + componentProps: { + showCount: true, + maxLength: 10, + }, + }, + { + label: '按钮图标', + field: 'icon', + component: 'IconPicker', + }, + { + label: '指令内容', + field: 'descr', + required: true, + component: 'InputTextArea', + componentProps: { + autosize: { minRows: 4, maxRows: 4 }, + showCount: true, + maxLength: 100, + } + }, +]; diff --git a/jeecgboot-vue3/src/views/super/airag/aiapp/AiAppList.vue b/jeecgboot-vue3/src/views/super/airag/aiapp/AiAppList.vue new file mode 100644 index 00000000..84a9b96d --- /dev/null +++ b/jeecgboot-vue3/src/views/super/airag/aiapp/AiAppList.vue @@ -0,0 +1,494 @@ + + + + + + + diff --git a/jeecgboot-vue3/src/views/super/airag/aiapp/chat/AiChat.vue b/jeecgboot-vue3/src/views/super/airag/aiapp/chat/AiChat.vue new file mode 100644 index 00000000..add5eb96 --- /dev/null +++ b/jeecgboot-vue3/src/views/super/airag/aiapp/chat/AiChat.vue @@ -0,0 +1,372 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/super/airag/aiapp/chat/AiChatIcon.vue b/jeecgboot-vue3/src/views/super/airag/aiapp/chat/AiChatIcon.vue new file mode 100644 index 00000000..54e31854 --- /dev/null +++ b/jeecgboot-vue3/src/views/super/airag/aiapp/chat/AiChatIcon.vue @@ -0,0 +1,87 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/super/airag/aiapp/chat/chat.vue b/jeecgboot-vue3/src/views/super/airag/aiapp/chat/chat.vue new file mode 100644 index 00000000..045f9865 --- /dev/null +++ b/jeecgboot-vue3/src/views/super/airag/aiapp/chat/chat.vue @@ -0,0 +1,919 @@ + + + + + + diff --git a/jeecgboot-vue3/src/views/super/airag/aiapp/chat/chatMessage.vue b/jeecgboot-vue3/src/views/super/airag/aiapp/chat/chatMessage.vue new file mode 100644 index 00000000..478a20d0 --- /dev/null +++ b/jeecgboot-vue3/src/views/super/airag/aiapp/chat/chatMessage.vue @@ -0,0 +1,157 @@ + + + + + diff --git a/jeecgboot-vue3/src/components/jeecg/AiChat/components/chatText.vue b/jeecgboot-vue3/src/views/super/airag/aiapp/chat/chatText.vue similarity index 91% rename from jeecgboot-vue3/src/components/jeecg/AiChat/components/chatText.vue rename to jeecgboot-vue3/src/views/super/airag/aiapp/chat/chatText.vue index 6d49ace1..c7e5030c 100644 --- a/jeecgboot-vue3/src/components/jeecg/AiChat/components/chatText.vue +++ b/jeecgboot-vue3/src/views/super/airag/aiapp/chat/chatText.vue @@ -1,6 +1,6 @@