gemcap-be-common 1.5.116 → 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.
@@ -31,6 +31,11 @@ import mongoose from 'mongoose';
31
31
  import { TModelName } from './_models';
32
32
  import { TTaskStatus } from '../interfaces/task.interface';
33
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
+ }
34
39
  export interface IAIJobInputFile {
35
40
  storageFileId: string;
36
41
  aiStorageFileId: string;
@@ -72,6 +77,7 @@ export interface IAIJob {
72
77
  provider?: string;
73
78
  model?: string;
74
79
  skillId?: string;
80
+ response?: IAIJobResponseChunk[];
75
81
  responseText?: string;
76
82
  rawResponse?: unknown;
77
83
  errorMessage?: 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
  },
@@ -5,6 +5,13 @@ import { TTaskStatus } from '../interfaces/task.interface';
5
5
 
6
6
  export const AI_JOBS_FOLDER = 'AI_jobs';
7
7
 
8
+ export interface IAIJobResponseChunk {
9
+ type: 'text' | 'thinking' | 'tool' | 'status';
10
+ timestamp: Date;
11
+ content: string;
12
+ }
13
+
14
+
8
15
  export interface IAIJobInputFile {
9
16
  storageFileId: string;
10
17
  aiStorageFileId: 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
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemcap-be-common",
3
- "version": "1.5.116",
3
+ "version": "1.5.117",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {