gemcap-be-common 1.5.115 → 1.5.117
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/models/AiJob.model.d.ts +7 -0
- package/models/AiJob.model.js +16 -2
- package/models/AiJob.model.ts +23 -1
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
package/models/AiJob.model.d.ts
CHANGED
|
@@ -30,6 +30,12 @@
|
|
|
30
30
|
import mongoose from 'mongoose';
|
|
31
31
|
import { TModelName } from './_models';
|
|
32
32
|
import { TTaskStatus } from '../interfaces/task.interface';
|
|
33
|
+
export declare const AI_JOBS_FOLDER = "AI_jobs";
|
|
34
|
+
export interface IAIJobResponseChunk {
|
|
35
|
+
type: 'text' | 'thinking' | 'tool' | 'status';
|
|
36
|
+
timestamp: Date;
|
|
37
|
+
content: string;
|
|
38
|
+
}
|
|
33
39
|
export interface IAIJobInputFile {
|
|
34
40
|
storageFileId: string;
|
|
35
41
|
aiStorageFileId: string;
|
|
@@ -71,6 +77,7 @@ export interface IAIJob {
|
|
|
71
77
|
provider?: string;
|
|
72
78
|
model?: string;
|
|
73
79
|
skillId?: string;
|
|
80
|
+
response?: IAIJobResponseChunk[];
|
|
74
81
|
responseText?: string;
|
|
75
82
|
rawResponse?: unknown;
|
|
76
83
|
errorMessage?: string;
|
package/models/AiJob.model.js
CHANGED
|
@@ -3,10 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.AIJob = exports.AIJobSchema = void 0;
|
|
6
|
+
exports.AIJob = exports.AIJobSchema = exports.AI_JOBS_FOLDER = void 0;
|
|
7
7
|
const mongoose_1 = __importDefault(require("mongoose"));
|
|
8
8
|
const _models_1 = require("./_models");
|
|
9
|
-
|
|
9
|
+
exports.AI_JOBS_FOLDER = 'AI_jobs';
|
|
10
10
|
exports.AIJobSchema = new mongoose_1.default.Schema({
|
|
11
11
|
taskId: {
|
|
12
12
|
type: String,
|
|
@@ -83,6 +83,20 @@ exports.AIJobSchema = new mongoose_1.default.Schema({
|
|
|
83
83
|
skillId: {
|
|
84
84
|
type: String,
|
|
85
85
|
},
|
|
86
|
+
response: [{
|
|
87
|
+
type: {
|
|
88
|
+
type: String,
|
|
89
|
+
required: true,
|
|
90
|
+
},
|
|
91
|
+
timestamp: {
|
|
92
|
+
type: Date,
|
|
93
|
+
required: true,
|
|
94
|
+
},
|
|
95
|
+
content: {
|
|
96
|
+
type: String,
|
|
97
|
+
required: true,
|
|
98
|
+
},
|
|
99
|
+
}],
|
|
86
100
|
responseText: {
|
|
87
101
|
type: String,
|
|
88
102
|
},
|
package/models/AiJob.model.ts
CHANGED
|
@@ -3,7 +3,14 @@ import mongoose from 'mongoose';
|
|
|
3
3
|
import { MODEL_NAMES, TModelName } from './_models';
|
|
4
4
|
import { TTaskStatus } from '../interfaces/task.interface';
|
|
5
5
|
|
|
6
|
-
const AI_JOBS_FOLDER = 'AI_jobs';
|
|
6
|
+
export const AI_JOBS_FOLDER = 'AI_jobs';
|
|
7
|
+
|
|
8
|
+
export interface IAIJobResponseChunk {
|
|
9
|
+
type: 'text' | 'thinking' | 'tool' | 'status';
|
|
10
|
+
timestamp: Date;
|
|
11
|
+
content: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
7
14
|
|
|
8
15
|
export interface IAIJobInputFile {
|
|
9
16
|
storageFileId: string;
|
|
@@ -60,6 +67,7 @@ export interface IAIJob {
|
|
|
60
67
|
model?: string;
|
|
61
68
|
skillId?: string;
|
|
62
69
|
|
|
70
|
+
response?: IAIJobResponseChunk[];
|
|
63
71
|
responseText?: string;
|
|
64
72
|
rawResponse?: unknown;
|
|
65
73
|
|
|
@@ -171,6 +179,20 @@ export const AIJobSchema = new mongoose.Schema<IAIJob, TAIJobModel>(
|
|
|
171
179
|
skillId: {
|
|
172
180
|
type: String,
|
|
173
181
|
},
|
|
182
|
+
response: [{
|
|
183
|
+
type: {
|
|
184
|
+
type: String,
|
|
185
|
+
required: true,
|
|
186
|
+
},
|
|
187
|
+
timestamp: {
|
|
188
|
+
type: Date,
|
|
189
|
+
required: true,
|
|
190
|
+
},
|
|
191
|
+
content: {
|
|
192
|
+
type: String,
|
|
193
|
+
required: true,
|
|
194
|
+
},
|
|
195
|
+
}],
|
|
174
196
|
responseText: {
|
|
175
197
|
type: String,
|
|
176
198
|
},
|