@purpleschool/gptbot 0.7.32 → 0.7.34
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/build/models/tools/image-editor/image-editor-config.schema.js +10 -2
- package/build/models/tools/image-editor/image-editor-job.schema.js +2 -1
- package/models/tools/image-editor/image-editor-config.schema.ts +12 -1
- package/models/tools/image-editor/image-editor-job.schema.ts +2 -1
- package/package.json +1 -1
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ImageEditorConfigSchema = exports.PromptGroupSchema = exports.SystemPromptSchema = void 0;
|
|
3
|
+
exports.ImageEditorConfigSchema = exports.PromptGroupSchema = exports.SystemPromptSchema = exports.SystemPromptParamsSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const image_editor_model_schema_1 = require("./image-editor-model.schema");
|
|
6
6
|
const icon_variants_schema_1 = require("../../icon-variants.schema");
|
|
7
|
+
exports.SystemPromptParamsSchema = zod_1.z.object({
|
|
8
|
+
imageSettings: zod_1.z.object({
|
|
9
|
+
minImages: zod_1.z.number(),
|
|
10
|
+
maxImages: zod_1.z.number(),
|
|
11
|
+
}),
|
|
12
|
+
});
|
|
7
13
|
exports.SystemPromptSchema = zod_1.z.object({
|
|
8
14
|
uuid: zod_1.z.string(),
|
|
9
15
|
title: zod_1.z.string(),
|
|
@@ -11,6 +17,7 @@ exports.SystemPromptSchema = zod_1.z.object({
|
|
|
11
17
|
prompt: zod_1.z.string(),
|
|
12
18
|
allowUserPrompt: zod_1.z.boolean(),
|
|
13
19
|
groupId: zod_1.z.string().uuid(),
|
|
20
|
+
params: exports.SystemPromptParamsSchema,
|
|
14
21
|
preview: zod_1.z
|
|
15
22
|
.object({
|
|
16
23
|
before: zod_1.z.string(),
|
|
@@ -18,6 +25,7 @@ exports.SystemPromptSchema = zod_1.z.object({
|
|
|
18
25
|
})
|
|
19
26
|
.optional()
|
|
20
27
|
.nullable(),
|
|
28
|
+
order: zod_1.z.number(),
|
|
21
29
|
});
|
|
22
30
|
exports.PromptGroupSchema = zod_1.z.object({
|
|
23
31
|
uuid: zod_1.z.string(),
|
|
@@ -28,5 +36,5 @@ exports.PromptGroupSchema = zod_1.z.object({
|
|
|
28
36
|
});
|
|
29
37
|
exports.ImageEditorConfigSchema = zod_1.z.object({
|
|
30
38
|
models: zod_1.z.array(image_editor_model_schema_1.ImageEditorModelSchema),
|
|
31
|
-
promptGroups: zod_1.z.array(exports.
|
|
39
|
+
promptGroups: zod_1.z.array(exports.PromptGroupSchema),
|
|
32
40
|
});
|
|
@@ -3,11 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ImageEditorJobSchema = exports.ImageEditorJobParamsSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const constants_1 = require("../../../constants");
|
|
6
|
+
const tool_job_schema_1 = require("../../tool-job.schema");
|
|
6
7
|
exports.ImageEditorJobParamsSchema = zod_1.z.object({
|
|
7
8
|
imageUrls: zod_1.z.array(zod_1.z.string()).optional(),
|
|
8
9
|
systemPromptId: zod_1.z.string().optional(),
|
|
9
10
|
});
|
|
10
|
-
exports.ImageEditorJobSchema =
|
|
11
|
+
exports.ImageEditorJobSchema = tool_job_schema_1.ToolJobSchema.extend({
|
|
11
12
|
title: zod_1.z.string(),
|
|
12
13
|
prompt: zod_1.z.string(),
|
|
13
14
|
reaction: zod_1.z.nativeEnum(constants_1.USER_REACTION).nullable(),
|
|
@@ -2,6 +2,15 @@ import { z } from 'zod';
|
|
|
2
2
|
import { ImageEditorModelSchema } from './image-editor-model.schema';
|
|
3
3
|
import { IconVariantsSchema } from '../../icon-variants.schema';
|
|
4
4
|
|
|
5
|
+
export const SystemPromptParamsSchema = z.object({
|
|
6
|
+
imageSettings: z.object({
|
|
7
|
+
minImages: z.number(),
|
|
8
|
+
maxImages: z.number(),
|
|
9
|
+
}),
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export type SystemPromptParams = z.infer<typeof SystemPromptParamsSchema>;
|
|
13
|
+
|
|
5
14
|
export const SystemPromptSchema = z.object({
|
|
6
15
|
uuid: z.string(),
|
|
7
16
|
title: z.string(),
|
|
@@ -9,6 +18,7 @@ export const SystemPromptSchema = z.object({
|
|
|
9
18
|
prompt: z.string(),
|
|
10
19
|
allowUserPrompt: z.boolean(),
|
|
11
20
|
groupId: z.string().uuid(),
|
|
21
|
+
params: SystemPromptParamsSchema,
|
|
12
22
|
preview: z
|
|
13
23
|
.object({
|
|
14
24
|
before: z.string(),
|
|
@@ -16,6 +26,7 @@ export const SystemPromptSchema = z.object({
|
|
|
16
26
|
})
|
|
17
27
|
.optional()
|
|
18
28
|
.nullable(),
|
|
29
|
+
order: z.number(),
|
|
19
30
|
});
|
|
20
31
|
|
|
21
32
|
export const PromptGroupSchema = z.object({
|
|
@@ -28,5 +39,5 @@ export const PromptGroupSchema = z.object({
|
|
|
28
39
|
|
|
29
40
|
export const ImageEditorConfigSchema = z.object({
|
|
30
41
|
models: z.array(ImageEditorModelSchema),
|
|
31
|
-
promptGroups: z.array(
|
|
42
|
+
promptGroups: z.array(PromptGroupSchema),
|
|
32
43
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { USER_REACTION } from '../../../constants';
|
|
3
|
+
import { ToolJobSchema } from '../../tool-job.schema';
|
|
3
4
|
|
|
4
5
|
export const ImageEditorJobParamsSchema = z.object({
|
|
5
6
|
imageUrls: z.array(z.string()).optional(),
|
|
@@ -8,7 +9,7 @@ export const ImageEditorJobParamsSchema = z.object({
|
|
|
8
9
|
|
|
9
10
|
export type ImageEditorJobParams = z.infer<typeof ImageEditorJobParamsSchema>;
|
|
10
11
|
|
|
11
|
-
export const ImageEditorJobSchema =
|
|
12
|
+
export const ImageEditorJobSchema = ToolJobSchema.extend({
|
|
12
13
|
title: z.string(),
|
|
13
14
|
prompt: z.string(),
|
|
14
15
|
reaction: z.nativeEnum(USER_REACTION).nullable(),
|