@purpleschool/gptbot 0.12.79 → 0.12.80

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.
@@ -1,6 +1,7 @@
1
1
  export const CANVAS_TEXT_GENERATION_PRIVATE = 'private/ai-canvas/tools/text-generation' as const;
2
2
 
3
3
  export const CANVAS_TEXT_GENERATION_ROUTES = {
4
+ CONFIG: 'config',
4
5
  PRICE: 'price',
5
6
  GENERATE: 'generate',
6
7
  } as const;
package/api/routes.ts CHANGED
@@ -1365,6 +1365,7 @@ export const REST_API = {
1365
1365
  GENERATE: `${ROOT}/${CONTROLLERS.PALETTE_CONTROLLER_PRIVATE}/${CONTROLLERS.PALETTE_ROUTES.GENERATE}`,
1366
1366
  },
1367
1367
  CANVAS_TEXT_GENERATION_PRIVATE: {
1368
+ CONFIG: `${ROOT}/${CONTROLLERS.CANVAS_TEXT_GENERATION_PRIVATE}/${CONTROLLERS.CANVAS_TEXT_GENERATION_ROUTES.CONFIG}`,
1368
1369
  PRICE: `${ROOT}/${CONTROLLERS.CANVAS_TEXT_GENERATION_PRIVATE}/${CONTROLLERS.CANVAS_TEXT_GENERATION_ROUTES.PRICE}`,
1369
1370
  GENERATE: `${ROOT}/${CONTROLLERS.CANVAS_TEXT_GENERATION_PRIVATE}/${CONTROLLERS.CANVAS_TEXT_GENERATION_ROUTES.GENERATE}`,
1370
1371
  },
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CANVAS_TEXT_GENERATION_ROUTES = exports.CANVAS_TEXT_GENERATION_PRIVATE = void 0;
4
4
  exports.CANVAS_TEXT_GENERATION_PRIVATE = 'private/ai-canvas/tools/text-generation';
5
5
  exports.CANVAS_TEXT_GENERATION_ROUTES = {
6
+ CONFIG: 'config',
6
7
  PRICE: 'price',
7
8
  GENERATE: 'generate',
8
9
  };
@@ -1006,6 +1006,7 @@ exports.REST_API = {
1006
1006
  GENERATE: `${exports.ROOT}/${CONTROLLERS.PALETTE_CONTROLLER_PRIVATE}/${CONTROLLERS.PALETTE_ROUTES.GENERATE}`,
1007
1007
  },
1008
1008
  CANVAS_TEXT_GENERATION_PRIVATE: {
1009
+ CONFIG: `${exports.ROOT}/${CONTROLLERS.CANVAS_TEXT_GENERATION_PRIVATE}/${CONTROLLERS.CANVAS_TEXT_GENERATION_ROUTES.CONFIG}`,
1009
1010
  PRICE: `${exports.ROOT}/${CONTROLLERS.CANVAS_TEXT_GENERATION_PRIVATE}/${CONTROLLERS.CANVAS_TEXT_GENERATION_ROUTES.PRICE}`,
1010
1011
  GENERATE: `${exports.ROOT}/${CONTROLLERS.CANVAS_TEXT_GENERATION_PRIVATE}/${CONTROLLERS.CANVAS_TEXT_GENERATION_ROUTES.GENERATE}`,
1011
1012
  },
@@ -10,7 +10,6 @@ var GenerateTextCommand;
10
10
  canvasId: zod_1.z.string().uuid(),
11
11
  modelId: zod_1.z.string().uuid(),
12
12
  prompt: zod_1.z.string().trim(),
13
- fileIds: zod_1.z.array(zod_1.z.string().uuid()).optional(),
14
13
  });
15
14
  GenerateTextCommand.ResponseSchema = zod_1.z.object({
16
15
  data: models_1.TextGenOutputSchema,
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetTextGenerationConfigCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../../../models");
6
+ var GetTextGenerationConfigCommand;
7
+ (function (GetTextGenerationConfigCommand) {
8
+ GetTextGenerationConfigCommand.ResponseSchema = zod_1.z.object({
9
+ data: zod_1.z.array(models_1.AiVendorSchema.extend({
10
+ models: zod_1.z.array(models_1.AiModelWithUnlockedBySchema),
11
+ })),
12
+ });
13
+ })(GetTextGenerationConfigCommand || (exports.GetTextGenerationConfigCommand = GetTextGenerationConfigCommand = {}));
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./generate-text.command"), exports);
18
+ __exportStar(require("./get-text-generation-config.command"), exports);
18
19
  __exportStar(require("./get-text-generation-price.command"), exports);
@@ -7,7 +7,6 @@ export namespace GenerateTextCommand {
7
7
  canvasId: z.string().uuid(),
8
8
  modelId: z.string().uuid(),
9
9
  prompt: z.string().trim(),
10
- fileIds: z.array(z.string().uuid()).optional(),
11
10
  });
12
11
  export type Request = z.infer<typeof RequestSchema>;
13
12
 
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ import { AiModelWithUnlockedBySchema, AiVendorSchema } from '../../../../models';
3
+
4
+ export namespace GetTextGenerationConfigCommand {
5
+ export const ResponseSchema = z.object({
6
+ data: z.array(
7
+ AiVendorSchema.extend({
8
+ models: z.array(AiModelWithUnlockedBySchema),
9
+ }),
10
+ ),
11
+ });
12
+ export type Response = z.infer<typeof ResponseSchema>;
13
+ }
@@ -1,2 +1,3 @@
1
1
  export * from './generate-text.command';
2
+ export * from './get-text-generation-config.command';
2
3
  export * from './get-text-generation-price.command';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.12.79",
3
+ "version": "0.12.80",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",