@purpleschool/gptbot-tools 0.0.38-texteditor → 0.0.39-texteditor

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.
@@ -607,6 +607,11 @@ exports.ERRORS = {
607
607
  },
608
608
  },
609
609
  WRITER_AI_ACTION: {
610
+ AI_ERROR: {
611
+ code: 'WRITER_AI_ACTION.AI_ERROR',
612
+ message: 'Произошла ошибка во время запроса к ИИ',
613
+ httpCode: 500,
614
+ },
610
615
  SAVE_ERROR: {
611
616
  code: 'WRITER_AI_ACTION.SAVE_ERROR',
612
617
  message: 'Произошла ошибка при сохранении операции',
@@ -1,15 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ImageEditorConfigSchema = exports.ImageEditorActionGroup = exports.SystemPromptSchema = void 0;
3
+ exports.ImageEditorConfigSchema = exports.ImageEditorActionGroup = 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 common_1 = require("../../common");
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(),
10
16
  description: zod_1.z.string(),
11
17
  prompt: zod_1.z.string(),
12
18
  allowUserPrompt: zod_1.z.boolean(),
19
+ params: exports.SystemPromptParamsSchema,
13
20
  groupId: zod_1.z.string().uuid(),
14
21
  preview: zod_1.z
15
22
  .object({
@@ -606,6 +606,11 @@ export const ERRORS = {
606
606
  },
607
607
  },
608
608
  WRITER_AI_ACTION: {
609
+ AI_ERROR: {
610
+ code: 'WRITER_AI_ACTION.AI_ERROR',
611
+ message: 'Произошла ошибка во время запроса к ИИ',
612
+ httpCode: 500,
613
+ },
609
614
  SAVE_ERROR: {
610
615
  code: 'WRITER_AI_ACTION.SAVE_ERROR',
611
616
  message: 'Произошла ошибка при сохранении операции',
@@ -2,12 +2,22 @@ import { z } from 'zod';
2
2
  import { ImageEditorModelSchema } from './image-editor-model.schema';
3
3
  import { IconVariantsSchema } from '../../common';
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(),
8
17
  description: z.string(),
9
18
  prompt: z.string(),
10
19
  allowUserPrompt: z.boolean(),
20
+ params: SystemPromptParamsSchema,
11
21
  groupId: z.string().uuid(),
12
22
  preview: z
13
23
  .object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot-tools",
3
- "version": "0.0.38-texteditor",
3
+ "version": "0.0.39-texteditor",
4
4
  "main": "build/index.js",
5
5
  "types": "build/index.d.ts",
6
6
  "scripts": {