v-4.0.0 开源可二开源码

This commit is contained in:
vastxie
2024-12-12 23:10:51 +08:00
parent c831009379
commit 22ee5a71b2
1017 changed files with 69316 additions and 9248 deletions

View File

@@ -134,6 +134,10 @@ __decorate([
(0, typeorm_1.Column)({ comment: '音频Url', nullable: true, type: 'text' }),
__metadata("design:type", String)
], ChatLogEntity.prototype, "audioUrl", void 0);
__decorate([
(0, typeorm_1.Column)({ comment: '提问参考', nullable: true }),
__metadata("design:type", String)
], ChatLogEntity.prototype, "promptReference", void 0);
ChatLogEntity = __decorate([
(0, typeorm_1.Entity)({ name: 'chatlog' })
], ChatLogEntity);

View File

@@ -9,7 +9,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.ChatLogModule = void 0;
const common_1 = require("@nestjs/common");
const typeorm_1 = require("@nestjs/typeorm");
const badwords_entity_1 = require("../badwords/badwords.entity");
const chatGroup_entity_1 = require("../chatGroup/chatGroup.entity");
const user_entity_1 = require("../user/user.entity");
const chatLog_controller_1 = require("./chatLog.controller");
@@ -21,12 +20,7 @@ ChatLogModule = __decorate([
(0, common_1.Global)(),
(0, common_1.Module)({
imports: [
typeorm_1.TypeOrmModule.forFeature([
chatLog_entity_1.ChatLogEntity,
user_entity_1.UserEntity,
badwords_entity_1.BadWordsEntity,
chatGroup_entity_1.ChatGroupEntity,
]),
typeorm_1.TypeOrmModule.forFeature([chatLog_entity_1.ChatLogEntity, user_entity_1.UserEntity, chatGroup_entity_1.ChatGroupEntity]),
],
controllers: [chatLog_controller_1.ChatLogController],
providers: [chatLog_service_1.ChatLogService],

View File

@@ -236,7 +236,7 @@ let ChatLogService = class ChatLogService {
}
const list = await this.chatLogEntity.find({ where });
return list.map((item) => {
const { prompt, role, answer, createdAt, model, modelName, type, status, action, drawId, id, fileInfo, ttsUrl, videoUrl, audioUrl, customId, pluginParam, modelAvatar, taskData, } = item;
const { prompt, role, answer, createdAt, model, modelName, type, status, action, drawId, id, fileInfo, ttsUrl, videoUrl, audioUrl, customId, pluginParam, modelAvatar, taskData, promptReference, } = item;
return {
chatId: id,
dateTime: (0, utils_1.formatDate)(createdAt),
@@ -257,6 +257,7 @@ let ChatLogService = class ChatLogService {
pluginParam: pluginParam,
modelAvatar: modelAvatar,
taskData: taskData,
promptReference: promptReference,
};
});
}