@purpleschool/gptbot 0.5.58 → 0.5.60

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.
@@ -5,7 +5,7 @@ const models_1 = require("../../models");
5
5
  const zod_1 = require("zod");
6
6
  var CreateAIModelCommand;
7
7
  (function (CreateAIModelCommand) {
8
- CreateAIModelCommand.RequestSchema = models_1.AiModelSchema.omit({
8
+ CreateAIModelCommand.RequestSchema = models_1.CreateAiModelSchema.omit({
9
9
  uuid: true,
10
10
  createdAt: true,
11
11
  updatedAt: true,
@@ -5,7 +5,7 @@ const models_1 = require("../../models");
5
5
  const zod_1 = require("zod");
6
6
  var UpdateAIModelCommand;
7
7
  (function (UpdateAIModelCommand) {
8
- UpdateAIModelCommand.RequestSchema = models_1.AiModelSchema.omit({
8
+ UpdateAIModelCommand.RequestSchema = models_1.CreateAiModelSchema.omit({
9
9
  createdAt: true,
10
10
  updatedAt: true,
11
11
  uuid: true,
@@ -6,8 +6,12 @@ var GetInputLimitsCommand;
6
6
  (function (GetInputLimitsCommand) {
7
7
  GetInputLimitsCommand.ResponseSchema = zod_1.z.object({
8
8
  data: zod_1.z.object({
9
- maxInputTokens: zod_1.z.number(),
10
9
  maxInputLength: zod_1.z.number(),
10
+ models: zod_1.z.array(zod_1.z.object({
11
+ uuid: zod_1.z.string().uuid(),
12
+ title: zod_1.z.string(),
13
+ maxInputLength: zod_1.z.number(),
14
+ })),
11
15
  }),
12
16
  });
13
17
  })(GetInputLimitsCommand || (exports.GetInputLimitsCommand = GetInputLimitsCommand = {}));
@@ -10,4 +10,5 @@ var AI_MODEL_STRATEGY;
10
10
  AI_MODEL_STRATEGY["GROK_TEXT_GENERATION"] = "grok_text_generation";
11
11
  AI_MODEL_STRATEGY["CLAUDE_TEXT_GENERATION"] = "claude_text_generation";
12
12
  AI_MODEL_STRATEGY["FLUX_IMAGE_GENERATION"] = "flux_image_generation";
13
+ AI_MODEL_STRATEGY["STABLE_DIFFUSION_IMAGE_GENERATION"] = "stable_diffusion_image_generation";
13
14
  })(AI_MODEL_STRATEGY || (exports.AI_MODEL_STRATEGY = AI_MODEL_STRATEGY = {}));
@@ -1,13 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AiModelWithUnlockedBySchema = exports.AiModelSchema = void 0;
3
+ exports.AiModelWithUnlockedBySchema = exports.CreateAiModelSchema = exports.AiModelSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const constants_1 = require("../constants");
6
6
  exports.AiModelSchema = zod_1.z.object({
7
7
  uuid: zod_1.z.string().uuid(),
8
8
  title: zod_1.z.string(),
9
9
  description: zod_1.z.nullable(zod_1.z.string()),
10
- model: zod_1.z.string(),
11
10
  isPremium: zod_1.z.boolean(),
12
11
  tokenMultiplicator: zod_1.z.number(),
13
12
  order: zod_1.z.number(),
@@ -17,10 +16,13 @@ exports.AiModelSchema = zod_1.z.object({
17
16
  contentType: zod_1.z.enum(Object.values(constants_1.AI_MODEL_CONTENT_TYPE)),
18
17
  features: zod_1.z.array(zod_1.z.nativeEnum(constants_1.AI_MODEL_FEATURE)),
19
18
  maxInputLength: zod_1.z.number(),
20
- maxInputTokens: zod_1.z.number(),
21
19
  createdAt: zod_1.z.date(),
22
20
  updatedAt: zod_1.z.date(),
23
21
  });
22
+ exports.CreateAiModelSchema = exports.AiModelSchema.extend({
23
+ model: zod_1.z.string(),
24
+ maxInputTokens: zod_1.z.number(),
25
+ });
24
26
  exports.AiModelWithUnlockedBySchema = exports.AiModelSchema.extend({
25
27
  unlockedBy: zod_1.z
26
28
  .object({
@@ -14,6 +14,7 @@ exports.AiModelAccessFeatureSchema = exports.SubscriptionFeatureBaseSchema.exten
14
14
  isAvailable: zod_1.z.boolean(),
15
15
  order: zod_1.z.number(),
16
16
  contentType: zod_1.z.nativeEnum(constants_1.AI_MODEL_CONTENT_TYPE),
17
+ maxInputLength: zod_1.z.number(),
17
18
  }),
18
19
  });
19
20
  exports.RequestsQuotaFeatureSchema = exports.SubscriptionFeatureBaseSchema.extend({
@@ -1,8 +1,8 @@
1
- import { AiModelSchema } from '../../models';
1
+ import { AiModelSchema, CreateAiModelSchema } from '../../models';
2
2
  import { z } from 'zod';
3
3
 
4
4
  export namespace CreateAIModelCommand {
5
- export const RequestSchema = AiModelSchema.omit({
5
+ export const RequestSchema = CreateAiModelSchema.omit({
6
6
  uuid: true,
7
7
  createdAt: true,
8
8
  updatedAt: true,
@@ -1,8 +1,8 @@
1
- import { AiModelSchema } from '../../models';
1
+ import { AiModelSchema, CreateAiModelSchema } from '../../models';
2
2
  import { z } from 'zod';
3
3
 
4
4
  export namespace UpdateAIModelCommand {
5
- export const RequestSchema = AiModelSchema.omit({
5
+ export const RequestSchema = CreateAiModelSchema.omit({
6
6
  createdAt: true,
7
7
  updatedAt: true,
8
8
  uuid: true,
@@ -3,8 +3,14 @@ import { z } from 'zod';
3
3
  export namespace GetInputLimitsCommand {
4
4
  export const ResponseSchema = z.object({
5
5
  data: z.object({
6
- maxInputTokens: z.number(),
7
6
  maxInputLength: z.number(),
7
+ models: z.array(
8
+ z.object({
9
+ uuid: z.string().uuid(),
10
+ title: z.string(),
11
+ maxInputLength: z.number(),
12
+ }),
13
+ ),
8
14
  }),
9
15
  });
10
16
 
@@ -6,4 +6,5 @@ export enum AI_MODEL_STRATEGY {
6
6
  GROK_TEXT_GENERATION = 'grok_text_generation',
7
7
  CLAUDE_TEXT_GENERATION = 'claude_text_generation',
8
8
  FLUX_IMAGE_GENERATION = 'flux_image_generation',
9
+ STABLE_DIFFUSION_IMAGE_GENERATION = 'stable_diffusion_image_generation',
9
10
  }
@@ -10,7 +10,6 @@ export const AiModelSchema = z.object({
10
10
  uuid: z.string().uuid(),
11
11
  title: z.string(),
12
12
  description: z.nullable(z.string()),
13
- model: z.string(),
14
13
  isPremium: z.boolean(),
15
14
  tokenMultiplicator: z.number(),
16
15
  order: z.number(),
@@ -20,11 +19,15 @@ export const AiModelSchema = z.object({
20
19
  contentType: z.enum(Object.values(AI_MODEL_CONTENT_TYPE) as [TAIModelContentTypeEnum]),
21
20
  features: z.array(z.nativeEnum(AI_MODEL_FEATURE)),
22
21
  maxInputLength: z.number(),
23
- maxInputTokens: z.number(),
24
22
  createdAt: z.date(),
25
23
  updatedAt: z.date(),
26
24
  });
27
25
 
26
+ export const CreateAiModelSchema = AiModelSchema.extend({
27
+ model: z.string(),
28
+ maxInputTokens: z.number(),
29
+ });
30
+
28
31
  export const AiModelWithUnlockedBySchema = AiModelSchema.extend({
29
32
  unlockedBy: z
30
33
  .object({
@@ -13,6 +13,7 @@ export const AiModelAccessFeatureSchema = SubscriptionFeatureBaseSchema.extend({
13
13
  isAvailable: z.boolean(),
14
14
  order: z.number(),
15
15
  contentType: z.nativeEnum(AI_MODEL_CONTENT_TYPE),
16
+ maxInputLength: z.number(),
16
17
  }),
17
18
  });
18
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.5.58",
3
+ "version": "0.5.60",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",