mirror of
https://github.com/vastxie/99AI.git
synced 2025-11-09 02:03:44 +08:00
v4.1.0
This commit is contained in:
101
AIWebQuickDeploy/dist/modules/chatGroup/chatGroup.controller.js
vendored
Normal file
101
AIWebQuickDeploy/dist/modules/chatGroup/chatGroup.controller.js
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
||||
return function (target, key) { decorator(target, key, paramIndex); }
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ChatGroupController = void 0;
|
||||
const swagger_1 = require("@nestjs/swagger");
|
||||
const chatGroup_service_1 = require("./chatGroup.service");
|
||||
const common_1 = require("@nestjs/common");
|
||||
const createGroup_dto_1 = require("./dto/createGroup.dto");
|
||||
const jwtAuth_guard_1 = require("../../common/auth/jwtAuth.guard");
|
||||
const delGroup_dto_1 = require("./dto/delGroup.dto");
|
||||
const updateGroup_dto_1 = require("./dto/updateGroup.dto");
|
||||
let ChatGroupController = class ChatGroupController {
|
||||
constructor(chatGroupService) {
|
||||
this.chatGroupService = chatGroupService;
|
||||
}
|
||||
create(body, req) {
|
||||
return this.chatGroupService.create(body, req);
|
||||
}
|
||||
query(req) {
|
||||
return this.chatGroupService.query(req);
|
||||
}
|
||||
update(body, req) {
|
||||
return this.chatGroupService.update(body, req);
|
||||
}
|
||||
del(body, req) {
|
||||
return this.chatGroupService.del(body, req);
|
||||
}
|
||||
delAll(req) {
|
||||
return this.chatGroupService.delAll(req);
|
||||
}
|
||||
};
|
||||
__decorate([
|
||||
(0, common_1.Post)('create'),
|
||||
(0, swagger_1.ApiOperation)({ summary: '创建对话组' }),
|
||||
(0, common_1.UseGuards)(jwtAuth_guard_1.JwtAuthGuard),
|
||||
(0, swagger_1.ApiBearerAuth)(),
|
||||
__param(0, (0, common_1.Body)()),
|
||||
__param(1, (0, common_1.Req)()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [createGroup_dto_1.CreateGroupDto, Object]),
|
||||
__metadata("design:returntype", void 0)
|
||||
], ChatGroupController.prototype, "create", null);
|
||||
__decorate([
|
||||
(0, common_1.Get)('query'),
|
||||
(0, swagger_1.ApiOperation)({ summary: '查询对话组' }),
|
||||
(0, common_1.UseGuards)(jwtAuth_guard_1.JwtAuthGuard),
|
||||
(0, swagger_1.ApiBearerAuth)(),
|
||||
__param(0, (0, common_1.Req)()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Object]),
|
||||
__metadata("design:returntype", void 0)
|
||||
], ChatGroupController.prototype, "query", null);
|
||||
__decorate([
|
||||
(0, common_1.Post)('update'),
|
||||
(0, swagger_1.ApiOperation)({ summary: '更新对话组' }),
|
||||
(0, common_1.UseGuards)(jwtAuth_guard_1.JwtAuthGuard),
|
||||
(0, swagger_1.ApiBearerAuth)(),
|
||||
__param(0, (0, common_1.Body)()),
|
||||
__param(1, (0, common_1.Req)()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [updateGroup_dto_1.UpdateGroupDto, Object]),
|
||||
__metadata("design:returntype", void 0)
|
||||
], ChatGroupController.prototype, "update", null);
|
||||
__decorate([
|
||||
(0, common_1.Post)('del'),
|
||||
(0, swagger_1.ApiOperation)({ summary: '删除对话组' }),
|
||||
(0, common_1.UseGuards)(jwtAuth_guard_1.JwtAuthGuard),
|
||||
(0, swagger_1.ApiBearerAuth)(),
|
||||
__param(0, (0, common_1.Body)()),
|
||||
__param(1, (0, common_1.Req)()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [delGroup_dto_1.DelGroupDto, Object]),
|
||||
__metadata("design:returntype", void 0)
|
||||
], ChatGroupController.prototype, "del", null);
|
||||
__decorate([
|
||||
(0, common_1.Post)('delAll'),
|
||||
(0, swagger_1.ApiOperation)({ summary: '删除对话组' }),
|
||||
(0, common_1.UseGuards)(jwtAuth_guard_1.JwtAuthGuard),
|
||||
(0, swagger_1.ApiBearerAuth)(),
|
||||
__param(0, (0, common_1.Req)()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Object]),
|
||||
__metadata("design:returntype", void 0)
|
||||
], ChatGroupController.prototype, "delAll", null);
|
||||
ChatGroupController = __decorate([
|
||||
(0, swagger_1.ApiTags)('group'),
|
||||
(0, common_1.Controller)('group'),
|
||||
__metadata("design:paramtypes", [chatGroup_service_1.ChatGroupService])
|
||||
], ChatGroupController);
|
||||
exports.ChatGroupController = ChatGroupController;
|
||||
56
AIWebQuickDeploy/dist/modules/chatGroup/chatGroup.entity.js
vendored
Normal file
56
AIWebQuickDeploy/dist/modules/chatGroup/chatGroup.entity.js
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ChatGroupEntity = void 0;
|
||||
const baseEntity_1 = require("../../common/entity/baseEntity");
|
||||
const typeorm_1 = require("typeorm");
|
||||
let ChatGroupEntity = class ChatGroupEntity extends baseEntity_1.BaseEntity {
|
||||
};
|
||||
__decorate([
|
||||
(0, typeorm_1.Column)({ comment: '用户ID' }),
|
||||
__metadata("design:type", Number)
|
||||
], ChatGroupEntity.prototype, "userId", void 0);
|
||||
__decorate([
|
||||
(0, typeorm_1.Column)({ comment: '是否置顶聊天', type: 'boolean', default: false }),
|
||||
__metadata("design:type", Boolean)
|
||||
], ChatGroupEntity.prototype, "isSticky", void 0);
|
||||
__decorate([
|
||||
(0, typeorm_1.Column)({ comment: '分组名称', nullable: true }),
|
||||
__metadata("design:type", String)
|
||||
], ChatGroupEntity.prototype, "title", void 0);
|
||||
__decorate([
|
||||
(0, typeorm_1.Column)({ comment: '应用ID', nullable: true }),
|
||||
__metadata("design:type", Number)
|
||||
], ChatGroupEntity.prototype, "appId", void 0);
|
||||
__decorate([
|
||||
(0, typeorm_1.Column)({ comment: '是否删除了', default: false }),
|
||||
__metadata("design:type", Boolean)
|
||||
], ChatGroupEntity.prototype, "isDelete", void 0);
|
||||
__decorate([
|
||||
(0, typeorm_1.Column)({ comment: '配置', nullable: true, default: null, type: 'text' }),
|
||||
__metadata("design:type", String)
|
||||
], ChatGroupEntity.prototype, "config", void 0);
|
||||
__decorate([
|
||||
(0, typeorm_1.Column)({ comment: '附加参数', nullable: true, type: 'text' }),
|
||||
__metadata("design:type", String)
|
||||
], ChatGroupEntity.prototype, "params", void 0);
|
||||
__decorate([
|
||||
(0, typeorm_1.Column)({ comment: '文件链接', nullable: true, default: null, type: 'text' }),
|
||||
__metadata("design:type", String)
|
||||
], ChatGroupEntity.prototype, "fileUrl", void 0);
|
||||
__decorate([
|
||||
(0, typeorm_1.Column)({ comment: 'PDF中的文字内容', nullable: true, type: 'mediumtext' }),
|
||||
__metadata("design:type", String)
|
||||
], ChatGroupEntity.prototype, "pdfTextContent", void 0);
|
||||
ChatGroupEntity = __decorate([
|
||||
(0, typeorm_1.Entity)({ name: 'chat_group' })
|
||||
], ChatGroupEntity);
|
||||
exports.ChatGroupEntity = ChatGroupEntity;
|
||||
27
AIWebQuickDeploy/dist/modules/chatGroup/chatGroup.module.js
vendored
Normal file
27
AIWebQuickDeploy/dist/modules/chatGroup/chatGroup.module.js
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ChatGroupModule = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const chatGroup_controller_1 = require("./chatGroup.controller");
|
||||
const chatGroup_service_1 = require("./chatGroup.service");
|
||||
const typeorm_1 = require("@nestjs/typeorm");
|
||||
const chatGroup_entity_1 = require("./chatGroup.entity");
|
||||
const app_entity_1 = require("../app/app.entity");
|
||||
let ChatGroupModule = class ChatGroupModule {
|
||||
};
|
||||
ChatGroupModule = __decorate([
|
||||
(0, common_1.Global)(),
|
||||
(0, common_1.Module)({
|
||||
imports: [typeorm_1.TypeOrmModule.forFeature([chatGroup_entity_1.ChatGroupEntity, app_entity_1.AppEntity])],
|
||||
controllers: [chatGroup_controller_1.ChatGroupController],
|
||||
providers: [chatGroup_service_1.ChatGroupService],
|
||||
exports: [chatGroup_service_1.ChatGroupService]
|
||||
})
|
||||
], ChatGroupModule);
|
||||
exports.ChatGroupModule = ChatGroupModule;
|
||||
219
AIWebQuickDeploy/dist/modules/chatGroup/chatGroup.service.js
vendored
Normal file
219
AIWebQuickDeploy/dist/modules/chatGroup/chatGroup.service.js
vendored
Normal file
@@ -0,0 +1,219 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
||||
return function (target, key) { decorator(target, key, paramIndex); }
|
||||
};
|
||||
var __rest = (this && this.__rest) || function (s, e) {
|
||||
var t = {};
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
||||
t[p] = s[p];
|
||||
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
||||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
||||
t[p[i]] = s[p[i]];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ChatGroupService = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const typeorm_1 = require("@nestjs/typeorm");
|
||||
const axios_1 = require("axios");
|
||||
const pdf = require("pdf-parse");
|
||||
const typeorm_2 = require("typeorm");
|
||||
const app_entity_1 = require("../app/app.entity");
|
||||
const models_service_1 = require("../models/models.service");
|
||||
const chatGroup_entity_1 = require("./chatGroup.entity");
|
||||
let ChatGroupService = class ChatGroupService {
|
||||
constructor(chatGroupEntity, appEntity, modelsService) {
|
||||
this.chatGroupEntity = chatGroupEntity;
|
||||
this.appEntity = appEntity;
|
||||
this.modelsService = modelsService;
|
||||
}
|
||||
async create(body, req) {
|
||||
const { id } = req.user;
|
||||
const { appId, modelConfig: bodyModelConfig, params } = body;
|
||||
let modelConfig = bodyModelConfig || (await this.modelsService.getBaseConfig());
|
||||
if (!modelConfig) {
|
||||
throw new common_1.HttpException('管理员未配置任何AI模型、请先联系管理员开通聊天模型配置!', common_1.HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
modelConfig = JSON.parse(JSON.stringify(modelConfig));
|
||||
const groupParams = { title: '新对话', userId: id, appId, params };
|
||||
if (appId) {
|
||||
const appInfo = await this.appEntity.findOne({ where: { id: appId } });
|
||||
if (!appInfo) {
|
||||
throw new common_1.HttpException('非法操作、您在使用一个不存在的应用!', common_1.HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
const { status, name, isFixedModel, isGPTs, appModel, coverImg } = appInfo;
|
||||
Object.assign(modelConfig.modelInfo, {
|
||||
isGPTs,
|
||||
isFixedModel,
|
||||
modelAvatar: coverImg,
|
||||
modelName: name,
|
||||
});
|
||||
if (isGPTs === 1 || isFixedModel === 1) {
|
||||
const appModelKey = await this.modelsService.getCurrentModelKeyInfo(isFixedModel === 1 ? appModel : 'gpts');
|
||||
Object.assign(modelConfig.modelInfo, {
|
||||
deductType: appModelKey.deductType,
|
||||
deduct: appModelKey.deduct,
|
||||
model: appModel,
|
||||
isFileUpload: appModelKey.isFileUpload,
|
||||
});
|
||||
}
|
||||
if (![1, 3, 4, 5].includes(status)) {
|
||||
throw new common_1.HttpException('非法操作、您在使用一个未启用的应用!', common_1.HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
if (name) {
|
||||
groupParams.title = name;
|
||||
}
|
||||
}
|
||||
const newGroup = await this.chatGroupEntity.save(Object.assign(Object.assign({}, groupParams), { config: JSON.stringify(modelConfig) }));
|
||||
return newGroup;
|
||||
}
|
||||
async query(req) {
|
||||
try {
|
||||
const { id } = req.user;
|
||||
const params = { userId: id, isDelete: false };
|
||||
const res = await this.chatGroupEntity.find({
|
||||
where: params,
|
||||
order: { isSticky: 'DESC', updatedAt: 'DESC' },
|
||||
});
|
||||
return res;
|
||||
const appIds = res.filter((t) => t.appId).map((t) => t.appId);
|
||||
const appInfos = await this.appEntity.find({ where: { id: (0, typeorm_2.In)(appIds) } });
|
||||
return res.map((item) => {
|
||||
var _a;
|
||||
item.appLogo = (_a = appInfos.find((t) => t.id === item.appId)) === null || _a === void 0 ? void 0 : _a.coverImg;
|
||||
return item;
|
||||
});
|
||||
}
|
||||
catch (error) {
|
||||
console.log('error: ', error);
|
||||
}
|
||||
}
|
||||
async update(body, req) {
|
||||
const { title, isSticky, groupId, config, fileUrl } = body;
|
||||
const { id } = req.user;
|
||||
const g = await this.chatGroupEntity.findOne({
|
||||
where: { id: groupId, userId: id },
|
||||
});
|
||||
if (!g) {
|
||||
throw new common_1.HttpException('请先选择一个对话或者新加一个对话再操作!', common_1.HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
const { appId } = g;
|
||||
if (appId && !title) {
|
||||
try {
|
||||
const parseData = JSON.parse(config);
|
||||
if (Number(parseData.keyType) !== 1) {
|
||||
throw new common_1.HttpException('应用对话名称不能修改哟!', common_1.HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
}
|
||||
}
|
||||
const data = {};
|
||||
title && (data['title'] = title);
|
||||
typeof isSticky !== 'undefined' && (data['isSticky'] = isSticky);
|
||||
config && (data['config'] = config);
|
||||
fileUrl && (data['fileUrl'] = fileUrl);
|
||||
const u = await this.chatGroupEntity.update({ id: groupId }, data);
|
||||
if (u.affected) {
|
||||
if (fileUrl) {
|
||||
this.handlePdfExtraction(fileUrl, groupId);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
throw new common_1.HttpException('更新对话失败!', common_1.HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
}
|
||||
async handlePdfExtraction(fileUrl, groupId) {
|
||||
try {
|
||||
const pdfText = await this.extractPdfText(fileUrl);
|
||||
await this.chatGroupEntity.update({ id: groupId }, { pdfTextContent: pdfText });
|
||||
}
|
||||
catch (error) {
|
||||
console.error('PDF 读取失败:', error);
|
||||
}
|
||||
}
|
||||
async extractPdfText(fileUrl) {
|
||||
try {
|
||||
const response = await axios_1.default.get(fileUrl, {
|
||||
responseType: 'arraybuffer',
|
||||
});
|
||||
const dataBuffer = Buffer.from(response.data);
|
||||
const pdfData = await pdf(dataBuffer);
|
||||
return pdfData.text;
|
||||
}
|
||||
catch (error) {
|
||||
console.error('PDF 解析失败:', error);
|
||||
throw new Error('PDF 解析失败');
|
||||
}
|
||||
}
|
||||
async updateTime(groupId) {
|
||||
await this.chatGroupEntity.update(groupId, {
|
||||
updatedAt: new Date(),
|
||||
});
|
||||
}
|
||||
async del(body, req) {
|
||||
const { groupId } = body;
|
||||
const { id } = req.user;
|
||||
const g = await this.chatGroupEntity.findOne({
|
||||
where: { id: groupId, userId: id },
|
||||
});
|
||||
if (!g) {
|
||||
throw new common_1.HttpException('非法操作、您在删除一个非法资源!', common_1.HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
const r = await this.chatGroupEntity.update({ id: groupId }, { isDelete: true });
|
||||
if (r.affected) {
|
||||
return '删除成功';
|
||||
}
|
||||
else {
|
||||
throw new common_1.HttpException('删除失败!', common_1.HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
}
|
||||
async delAll(req) {
|
||||
const { id } = req.user;
|
||||
const r = await this.chatGroupEntity.update({ userId: id, isSticky: false, isDelete: false }, { isDelete: true });
|
||||
if (r.affected) {
|
||||
return '删除成功';
|
||||
}
|
||||
else {
|
||||
throw new common_1.HttpException('删除失败!', common_1.HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
}
|
||||
async getGroupInfoFromId(id) {
|
||||
if (!id)
|
||||
return;
|
||||
const groupInfo = await this.chatGroupEntity.findOne({ where: { id } });
|
||||
if (groupInfo) {
|
||||
const { pdfTextContent } = groupInfo, rest = __rest(groupInfo, ["pdfTextContent"]);
|
||||
return rest;
|
||||
}
|
||||
}
|
||||
async getGroupPdfText(groupId) {
|
||||
const groupInfo = await this.chatGroupEntity.findOne({
|
||||
where: { id: groupId },
|
||||
});
|
||||
if (groupInfo) {
|
||||
return groupInfo.pdfTextContent;
|
||||
}
|
||||
}
|
||||
};
|
||||
ChatGroupService = __decorate([
|
||||
(0, common_1.Injectable)(),
|
||||
__param(0, (0, typeorm_1.InjectRepository)(chatGroup_entity_1.ChatGroupEntity)),
|
||||
__param(1, (0, typeorm_1.InjectRepository)(app_entity_1.AppEntity)),
|
||||
__metadata("design:paramtypes", [typeorm_2.Repository,
|
||||
typeorm_2.Repository,
|
||||
models_service_1.ModelsService])
|
||||
], ChatGroupService);
|
||||
exports.ChatGroupService = ChatGroupService;
|
||||
38
AIWebQuickDeploy/dist/modules/chatGroup/dto/createGroup.dto.js
vendored
Normal file
38
AIWebQuickDeploy/dist/modules/chatGroup/dto/createGroup.dto.js
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CreateGroupDto = void 0;
|
||||
const swagger_1 = require("@nestjs/swagger");
|
||||
const class_validator_1 = require("class-validator");
|
||||
class CreateGroupDto {
|
||||
}
|
||||
__decorate([
|
||||
(0, swagger_1.ApiProperty)({ example: 10, description: '应用ID', required: false }),
|
||||
(0, class_validator_1.IsOptional)(),
|
||||
__metadata("design:type", Number)
|
||||
], CreateGroupDto.prototype, "appId", void 0);
|
||||
__decorate([
|
||||
(0, swagger_1.ApiProperty)({
|
||||
example: '',
|
||||
description: '对话模型配置项序列化的字符串',
|
||||
required: false,
|
||||
}),
|
||||
__metadata("design:type", Object)
|
||||
], CreateGroupDto.prototype, "modelConfig", void 0);
|
||||
__decorate([
|
||||
(0, swagger_1.ApiProperty)({
|
||||
example: '',
|
||||
description: '对话组参数序列化的字符串',
|
||||
required: false,
|
||||
}),
|
||||
__metadata("design:type", String)
|
||||
], CreateGroupDto.prototype, "params", void 0);
|
||||
exports.CreateGroupDto = CreateGroupDto;
|
||||
20
AIWebQuickDeploy/dist/modules/chatGroup/dto/delGroup.dto.js
vendored
Normal file
20
AIWebQuickDeploy/dist/modules/chatGroup/dto/delGroup.dto.js
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.DelGroupDto = void 0;
|
||||
const swagger_1 = require("@nestjs/swagger");
|
||||
class DelGroupDto {
|
||||
}
|
||||
__decorate([
|
||||
(0, swagger_1.ApiProperty)({ example: 1, description: '对话分组ID', required: true }),
|
||||
__metadata("design:type", Number)
|
||||
], DelGroupDto.prototype, "groupId", void 0);
|
||||
exports.DelGroupDto = DelGroupDto;
|
||||
45
AIWebQuickDeploy/dist/modules/chatGroup/dto/updateGroup.dto.js
vendored
Normal file
45
AIWebQuickDeploy/dist/modules/chatGroup/dto/updateGroup.dto.js
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.UpdateGroupDto = void 0;
|
||||
const swagger_1 = require("@nestjs/swagger");
|
||||
const class_validator_1 = require("class-validator");
|
||||
class UpdateGroupDto {
|
||||
}
|
||||
__decorate([
|
||||
(0, swagger_1.ApiProperty)({ example: 1, description: '修改的对话ID', required: false }),
|
||||
(0, class_validator_1.IsOptional)(),
|
||||
__metadata("design:type", Number)
|
||||
], UpdateGroupDto.prototype, "groupId", void 0);
|
||||
__decorate([
|
||||
(0, swagger_1.ApiProperty)({ example: 10, description: '对话组title', required: false }),
|
||||
(0, class_validator_1.IsOptional)(),
|
||||
__metadata("design:type", String)
|
||||
], UpdateGroupDto.prototype, "title", void 0);
|
||||
__decorate([
|
||||
(0, swagger_1.ApiProperty)({ example: 10, description: '对话组是否置顶', required: false }),
|
||||
(0, class_validator_1.IsOptional)(),
|
||||
__metadata("design:type", Boolean)
|
||||
], UpdateGroupDto.prototype, "isSticky", void 0);
|
||||
__decorate([
|
||||
(0, swagger_1.ApiProperty)({ example: '', description: '对话组文件地址', required: false }),
|
||||
(0, class_validator_1.IsOptional)(),
|
||||
__metadata("design:type", String)
|
||||
], UpdateGroupDto.prototype, "fileUrl", void 0);
|
||||
__decorate([
|
||||
(0, swagger_1.ApiProperty)({
|
||||
example: '',
|
||||
description: '对话模型配置项序列化的字符串',
|
||||
required: false,
|
||||
}),
|
||||
__metadata("design:type", String)
|
||||
], UpdateGroupDto.prototype, "config", void 0);
|
||||
exports.UpdateGroupDto = UpdateGroupDto;
|
||||
Reference in New Issue
Block a user