Initial commit: HZHub project setup with RuoYi-AI base
This commit is contained in:
61
hzhub-admin/apps/web-antd/src/api/knowledge/attach/index.ts
Normal file
61
hzhub-admin/apps/web-antd/src/api/knowledge/attach/index.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import type { AttachVO, AttachForm, AttachQuery } from './model';
|
||||
|
||||
import type { ID, IDS } from '#/api/common';
|
||||
import type { PageResult } from '#/api/common';
|
||||
|
||||
import { commonExport } from '#/api/helper';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
/**
|
||||
* 查询知识库附件列表
|
||||
* @param params
|
||||
* @returns 知识库附件列表
|
||||
*/
|
||||
export function attachList(params?: AttachQuery) {
|
||||
return requestClient.get<PageResult<AttachVO>>('/system/attach/list', { params });
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出知识库附件列表
|
||||
* @param params
|
||||
* @returns 知识库附件列表
|
||||
*/
|
||||
export function attachExport(params?: AttachQuery) {
|
||||
return commonExport('/system/attach/export', params ?? {});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询知识库附件详情
|
||||
* @param id id
|
||||
* @returns 知识库附件详情
|
||||
*/
|
||||
export function attachInfo(id: ID) {
|
||||
return requestClient.get<AttachVO>(`/system/attach/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增知识库附件
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function attachAdd(data: AttachForm) {
|
||||
return requestClient.postWithMsg<void>('/system/attach', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新知识库附件
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function attachUpdate(data: AttachForm) {
|
||||
return requestClient.putWithMsg<void>('/system/attach', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除知识库附件
|
||||
* @param id id
|
||||
* @returns void
|
||||
*/
|
||||
export function attachRemove(id: ID | IDS) {
|
||||
return requestClient.deleteWithMsg<void>(`/system/attach/${id}`);
|
||||
}
|
||||
109
hzhub-admin/apps/web-antd/src/api/knowledge/attach/model.d.ts
vendored
Normal file
109
hzhub-admin/apps/web-antd/src/api/knowledge/attach/model.d.ts
vendored
Normal file
@@ -0,0 +1,109 @@
|
||||
import type { PageQuery, BaseEntity } from '#/api/common';
|
||||
|
||||
export interface AttachVO {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 知识库ID
|
||||
*/
|
||||
knowledgeId: string | number;
|
||||
|
||||
/**
|
||||
* 附件名称
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* 附件类型
|
||||
*/
|
||||
type: string;
|
||||
|
||||
/**
|
||||
* 对象存储ID
|
||||
*/
|
||||
ossId: string | number;
|
||||
|
||||
/**
|
||||
* 文档内容
|
||||
*/
|
||||
content: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
}
|
||||
|
||||
export interface AttachForm extends BaseEntity {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 知识库ID
|
||||
*/
|
||||
knowledgeId?: string | number;
|
||||
|
||||
/**
|
||||
* 附件名称
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* 附件类型
|
||||
*/
|
||||
type?: string;
|
||||
|
||||
/**
|
||||
* 对象存储ID
|
||||
*/
|
||||
ossId?: string | number;
|
||||
|
||||
/**
|
||||
* 文档内容
|
||||
*/
|
||||
content?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface AttachQuery extends PageQuery {
|
||||
/**
|
||||
* 知识库ID
|
||||
*/
|
||||
knowledgeId?: string | number;
|
||||
|
||||
/**
|
||||
* 附件名称
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* 附件类型
|
||||
*/
|
||||
type?: string;
|
||||
|
||||
/**
|
||||
* 对象存储ID
|
||||
*/
|
||||
ossId?: string | number;
|
||||
|
||||
/**
|
||||
* 文档内容
|
||||
*/
|
||||
content?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
import type { FragmentVO, FragmentForm, FragmentQuery } from './model';
|
||||
|
||||
import type { ID, IDS } from '#/api/common';
|
||||
import type { PageResult } from '#/api/common';
|
||||
|
||||
import { commonExport } from '#/api/helper';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
/**
|
||||
* 查询知识片段列表
|
||||
* @param params
|
||||
* @returns 知识片段列表
|
||||
*/
|
||||
export function fragmentList(params?: FragmentQuery) {
|
||||
return requestClient.get<PageResult<FragmentVO>>('/system/fragment/list', { params });
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出知识片段列表
|
||||
* @param params
|
||||
* @returns 知识片段列表
|
||||
*/
|
||||
export function fragmentExport(params?: FragmentQuery) {
|
||||
return commonExport('/system/fragment/export', params ?? {});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询知识片段详情
|
||||
* @param id id
|
||||
* @returns 知识片段详情
|
||||
*/
|
||||
export function fragmentInfo(id: ID) {
|
||||
return requestClient.get<FragmentVO>(`/system/fragment/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增知识片段
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function fragmentAdd(data: FragmentForm) {
|
||||
return requestClient.postWithMsg<void>('/system/fragment', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新知识片段
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function fragmentUpdate(data: FragmentForm) {
|
||||
return requestClient.putWithMsg<void>('/system/fragment', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除知识片段
|
||||
* @param id id
|
||||
* @returns void
|
||||
*/
|
||||
export function fragmentRemove(id: ID | IDS) {
|
||||
return requestClient.deleteWithMsg<void>(`/system/fragment/${id}`);
|
||||
}
|
||||
79
hzhub-admin/apps/web-antd/src/api/knowledge/fragment/model.d.ts
vendored
Normal file
79
hzhub-admin/apps/web-antd/src/api/knowledge/fragment/model.d.ts
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
import type { PageQuery, BaseEntity } from '#/api/common';
|
||||
|
||||
export interface FragmentVO {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 附件ID
|
||||
*/
|
||||
attachId: string | number;
|
||||
|
||||
/**
|
||||
* 片段索引下标
|
||||
*/
|
||||
idx: string | number;
|
||||
|
||||
/**
|
||||
* 文档内容
|
||||
*/
|
||||
content: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
}
|
||||
|
||||
export interface FragmentForm extends BaseEntity {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 附件ID
|
||||
*/
|
||||
attachId?: string | number;
|
||||
|
||||
/**
|
||||
* 片段索引下标
|
||||
*/
|
||||
idx?: string | number;
|
||||
|
||||
/**
|
||||
* 文档内容
|
||||
*/
|
||||
content?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface FragmentQuery extends PageQuery {
|
||||
/**
|
||||
* 附件ID
|
||||
*/
|
||||
attachId?: string | number;
|
||||
|
||||
/**
|
||||
* 片段索引下标
|
||||
*/
|
||||
idx?: string | number;
|
||||
|
||||
/**
|
||||
* 文档内容
|
||||
*/
|
||||
content?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
61
hzhub-admin/apps/web-antd/src/api/knowledge/info/index.ts
Normal file
61
hzhub-admin/apps/web-antd/src/api/knowledge/info/index.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import type { InfoVO, InfoForm, InfoQuery } from './model';
|
||||
|
||||
import type { ID, IDS } from '#/api/common';
|
||||
import type { PageResult } from '#/api/common';
|
||||
|
||||
import { commonExport } from '#/api/helper';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
/**
|
||||
* 查询知识库列表
|
||||
* @param params
|
||||
* @returns 知识库列表
|
||||
*/
|
||||
export function infoList(params?: InfoQuery) {
|
||||
return requestClient.get<PageResult<InfoVO>>('/system/info/list', { params });
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出知识库列表
|
||||
* @param params
|
||||
* @returns 知识库列表
|
||||
*/
|
||||
export function infoExport(params?: InfoQuery) {
|
||||
return commonExport('/system/info/export', params ?? {});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询知识库详情
|
||||
* @param id id
|
||||
* @returns 知识库详情
|
||||
*/
|
||||
export function infoInfo(id: ID) {
|
||||
return requestClient.get<InfoVO>(`/system/info/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增知识库
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function infoAdd(data: InfoForm) {
|
||||
return requestClient.postWithMsg<void>('/system/info', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新知识库
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function infoUpdate(data: InfoForm) {
|
||||
return requestClient.putWithMsg<void>('/system/info', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除知识库
|
||||
* @param id id
|
||||
* @returns void
|
||||
*/
|
||||
export function infoRemove(id: ID | IDS) {
|
||||
return requestClient.deleteWithMsg<void>(`/system/info/${id}`);
|
||||
}
|
||||
184
hzhub-admin/apps/web-antd/src/api/knowledge/info/model.d.ts
vendored
Normal file
184
hzhub-admin/apps/web-antd/src/api/knowledge/info/model.d.ts
vendored
Normal file
@@ -0,0 +1,184 @@
|
||||
import type { PageQuery, BaseEntity } from '#/api/common';
|
||||
|
||||
export interface InfoVO {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
userId: string | number;
|
||||
|
||||
/**
|
||||
* 知识库名称
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* 是否公开知识库(0 否 1是)
|
||||
*/
|
||||
share: number;
|
||||
|
||||
/**
|
||||
* 知识库描述
|
||||
*/
|
||||
description: string;
|
||||
|
||||
/**
|
||||
* 知识分隔符
|
||||
*/
|
||||
separator: string;
|
||||
|
||||
/**
|
||||
* 重叠字符数
|
||||
*/
|
||||
overlapChar: number;
|
||||
|
||||
/**
|
||||
* 知识库中检索的条数
|
||||
*/
|
||||
retrieveLimit: number;
|
||||
|
||||
/**
|
||||
* 文本块大小
|
||||
*/
|
||||
textBlockSize: number;
|
||||
|
||||
/**
|
||||
* 向量库
|
||||
*/
|
||||
vectorModel: string;
|
||||
|
||||
/**
|
||||
* 向量模型
|
||||
*/
|
||||
embeddingModel: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
}
|
||||
|
||||
export interface InfoForm extends BaseEntity {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 知识库名称
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* 是否公开知识库(0 否 1是)
|
||||
*/
|
||||
share?: number;
|
||||
|
||||
/**
|
||||
* 知识库描述
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* 知识分隔符
|
||||
*/
|
||||
separator?: string;
|
||||
|
||||
/**
|
||||
* 重叠字符数
|
||||
*/
|
||||
overlapChar?: number;
|
||||
|
||||
/**
|
||||
* 知识库中检索的条数
|
||||
*/
|
||||
retrieveLimit?: number;
|
||||
|
||||
/**
|
||||
* 文本块大小
|
||||
*/
|
||||
textBlockSize?: number;
|
||||
|
||||
/**
|
||||
* 向量库
|
||||
*/
|
||||
vectorModel?: string;
|
||||
|
||||
/**
|
||||
* 向量模型
|
||||
*/
|
||||
embeddingModel?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface InfoQuery extends PageQuery {
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 知识库名称
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* 是否公开知识库(0 否 1是)
|
||||
*/
|
||||
share?: number;
|
||||
|
||||
/**
|
||||
* 知识库描述
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* 知识分隔符
|
||||
*/
|
||||
separator?: string;
|
||||
|
||||
/**
|
||||
* 重叠字符数
|
||||
*/
|
||||
overlapChar?: number;
|
||||
|
||||
/**
|
||||
* 知识库中检索的条数
|
||||
*/
|
||||
retrieveLimit?: number;
|
||||
|
||||
/**
|
||||
* 文本块大小
|
||||
*/
|
||||
textBlockSize?: number;
|
||||
|
||||
/**
|
||||
* 向量库
|
||||
*/
|
||||
vectorModel?: string;
|
||||
|
||||
/**
|
||||
* 向量模型
|
||||
*/
|
||||
embeddingModel?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
Reference in New Issue
Block a user