@purpleschool/gptbot 0.8.90-stage-2 → 0.8.91-stage-2

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.
@@ -8,7 +8,6 @@ var GetChatsConfigCommand;
8
8
  data: zod_1.z.object({
9
9
  maxFileAttachments: zod_1.z.number(),
10
10
  imageAttachmentCost: zod_1.z.number(),
11
- fileSearchAttachmentCost: zod_1.z.number(),
12
11
  imagePollingInterval: zod_1.z.number(),
13
12
  isWebSearchAvailable: zod_1.z.boolean(),
14
13
  isAttachmentAvailable: zod_1.z.boolean(),
@@ -8,7 +8,7 @@ var CreateTextMessageCommand;
8
8
  (function (CreateTextMessageCommand) {
9
9
  CreateTextMessageCommand.RequestSchema = zod_1.z.object({
10
10
  text: zod_1.z.string(),
11
- files: zod_1.z.array(models_1.FileAttachmentSchema).optional().default([]),
11
+ files: zod_1.z.array(zod_1.z.string().uuid()).optional().default([]),
12
12
  features: zod_1.z.array(zod_1.z.nativeEnum(constants_1.AI_MODEL_FEATURE)).optional().default([]),
13
13
  });
14
14
  CreateTextMessageCommand.RequestParamSchema = models_1.ChatSchema.pick({
@@ -15,4 +15,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./file-type.enum"), exports);
18
- __exportStar(require("./file-usage-mode.enum"), exports);
@@ -28,7 +28,6 @@ __exportStar(require("./course.schema"), exports);
28
28
  __exportStar(require("./date.schema"), exports);
29
29
  __exportStar(require("./feedback.schema"), exports);
30
30
  __exportStar(require("./file.schema"), exports);
31
- __exportStar(require("./file-attachment.schema"), exports);
32
31
  __exportStar(require("./key-value.schema"), exports);
33
32
  __exportStar(require("./form-submission.schema"), exports);
34
33
  __exportStar(require("./icon-variants.schema"), exports);
@@ -5,7 +5,6 @@ export namespace GetChatsConfigCommand {
5
5
  data: z.object({
6
6
  maxFileAttachments: z.number(),
7
7
  imageAttachmentCost: z.number(),
8
- fileSearchAttachmentCost: z.number(),
9
8
  imagePollingInterval: z.number(),
10
9
  isWebSearchAvailable: z.boolean(),
11
10
  isAttachmentAvailable: z.boolean(),
@@ -1,11 +1,11 @@
1
1
  import { AI_MODEL_FEATURE } from '../../constants';
2
- import { ChatSchema, FileAttachmentSchema, MessageSchema } from '../../models';
2
+ import { ChatSchema, MessageSchema } from '../../models';
3
3
  import { z } from 'zod';
4
4
 
5
5
  export namespace CreateTextMessageCommand {
6
6
  export const RequestSchema = z.object({
7
7
  text: z.string(),
8
- files: z.array(FileAttachmentSchema).optional().default([]),
8
+ files: z.array(z.string().uuid()).optional().default([]),
9
9
  features: z.array(z.nativeEnum(AI_MODEL_FEATURE)).optional().default([]),
10
10
  });
11
11
 
@@ -1,2 +1 @@
1
1
  export * from './file-type.enum';
2
- export * from './file-usage-mode.enum';
package/models/index.ts CHANGED
@@ -12,7 +12,6 @@ export * from './course.schema';
12
12
  export * from './date.schema';
13
13
  export * from './feedback.schema';
14
14
  export * from './file.schema';
15
- export * from './file-attachment.schema';
16
15
  export * from './key-value.schema';
17
16
  export * from './form-submission.schema';
18
17
  export * from './icon-variants.schema';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.8.90-stage-2",
3
+ "version": "0.8.91-stage-2",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FILE_USAGE_MODE = void 0;
4
- var FILE_USAGE_MODE;
5
- (function (FILE_USAGE_MODE) {
6
- FILE_USAGE_MODE["SEARCH"] = "search";
7
- FILE_USAGE_MODE["CONTEXT"] = "context";
8
- })(FILE_USAGE_MODE || (exports.FILE_USAGE_MODE = FILE_USAGE_MODE = {}));
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FileAttachmentSchema = exports.ImageFileAttachmentSchema = exports.TextFileAttachmentSchema = void 0;
4
- const zod_1 = require("zod");
5
- const constants_1 = require("../constants");
6
- exports.TextFileAttachmentSchema = zod_1.z.object({
7
- fileId: zod_1.z.string().uuid(),
8
- type: zod_1.z.enum([constants_1.FILE_TYPE.TEXT, constants_1.FILE_TYPE.DOCUMENT]),
9
- usageMode: zod_1.z.nativeEnum(constants_1.FILE_USAGE_MODE),
10
- });
11
- exports.ImageFileAttachmentSchema = zod_1.z.object({
12
- fileId: zod_1.z.string().uuid(),
13
- type: zod_1.z.literal(constants_1.FILE_TYPE.IMAGE),
14
- });
15
- exports.FileAttachmentSchema = zod_1.z.discriminatedUnion('type', [
16
- exports.TextFileAttachmentSchema,
17
- exports.ImageFileAttachmentSchema,
18
- ]);
@@ -1,4 +0,0 @@
1
- export enum FILE_USAGE_MODE {
2
- SEARCH = 'search',
3
- CONTEXT = 'context',
4
- }
@@ -1,24 +0,0 @@
1
- import { z } from 'zod';
2
- import { FILE_TYPE, FILE_USAGE_MODE } from '../constants';
3
-
4
- export const TextFileAttachmentSchema = z.object({
5
- fileId: z.string().uuid(),
6
- type: z.enum([FILE_TYPE.TEXT, FILE_TYPE.DOCUMENT]),
7
- usageMode: z.nativeEnum(FILE_USAGE_MODE),
8
- });
9
-
10
- export type TextFileAttachment = z.infer<typeof TextFileAttachmentSchema>;
11
-
12
- export const ImageFileAttachmentSchema = z.object({
13
- fileId: z.string().uuid(),
14
- type: z.literal(FILE_TYPE.IMAGE),
15
- });
16
-
17
- export type ImageFileAttachment = z.infer<typeof ImageFileAttachmentSchema>;
18
-
19
- export const FileAttachmentSchema = z.discriminatedUnion('type', [
20
- TextFileAttachmentSchema,
21
- ImageFileAttachmentSchema,
22
- ]);
23
-
24
- export type FileAttachment = z.infer<typeof FileAttachmentSchema>;