@purpleschool/gptbot 0.5.84 → 0.5.86
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/commands/chat/get-chats-config.command.js +2 -0
- package/build/constants/errors/errors.js +10 -0
- package/build/constants/subscription/enums/subscription-feature-type.enum.js +1 -0
- package/build/models/subscription-feature.schema.js +5 -1
- package/commands/chat/get-chats-config.command.ts +2 -0
- package/constants/errors/errors.ts +10 -0
- package/constants/subscription/enums/subscription-feature-type.enum.ts +1 -0
- package/models/subscription-feature.schema.ts +5 -0
- package/package.json +1 -1
|
@@ -9,6 +9,8 @@ var GetChatsConfigCommand;
|
|
|
9
9
|
maxFileAttachments: zod_1.z.number(),
|
|
10
10
|
imageAttachmentCost: zod_1.z.number(),
|
|
11
11
|
imagePollingInterval: zod_1.z.number(),
|
|
12
|
+
isWebSearchAvailable: zod_1.z.boolean(),
|
|
13
|
+
isAttachmentAvailable: zod_1.z.boolean(),
|
|
12
14
|
}),
|
|
13
15
|
});
|
|
14
16
|
})(GetChatsConfigCommand || (exports.GetChatsConfigCommand = GetChatsConfigCommand = {}));
|
|
@@ -1149,4 +1149,14 @@ exports.ERRORS = {
|
|
|
1149
1149
|
message: 'ИИ модель не поддерживает поиск в интернете',
|
|
1150
1150
|
httpCode: 400,
|
|
1151
1151
|
},
|
|
1152
|
+
WEB_SEARCH_NOT_AVAILABLE_TO_USER: {
|
|
1153
|
+
code: 'A251',
|
|
1154
|
+
message: 'Поиск в интернете не доступен данному пользователю',
|
|
1155
|
+
httpCode: 403,
|
|
1156
|
+
},
|
|
1157
|
+
CHAT_FILE_ATTACHMENT_NOT_ALLOWED: {
|
|
1158
|
+
code: 'A252',
|
|
1159
|
+
message: 'Незарегистрированный юзер не может прикреплять файлы',
|
|
1160
|
+
httpCode: 400,
|
|
1161
|
+
},
|
|
1152
1162
|
};
|
|
@@ -7,4 +7,5 @@ var SUBSCRIPTION_FEATURE_TYPE;
|
|
|
7
7
|
SUBSCRIPTION_FEATURE_TYPE["AI_MODEL_ACCESS"] = "ai_model_access";
|
|
8
8
|
SUBSCRIPTION_FEATURE_TYPE["MAX_INPUT_LENGTH"] = "max_input_length";
|
|
9
9
|
SUBSCRIPTION_FEATURE_TYPE["INFO"] = "info";
|
|
10
|
+
SUBSCRIPTION_FEATURE_TYPE["WEB_SEARCH"] = "web_search";
|
|
10
11
|
})(SUBSCRIPTION_FEATURE_TYPE || (exports.SUBSCRIPTION_FEATURE_TYPE = SUBSCRIPTION_FEATURE_TYPE = {}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SubscriptionFeatureSchema = exports.MaxInputLengthFeatureSchema = exports.RequestsQuotaFeatureSchema = exports.AiModelAccessFeatureSchema = exports.SubscriptionFeatureBaseSchema = void 0;
|
|
3
|
+
exports.SubscriptionFeatureSchema = exports.WebSearchFeatureSchema = exports.MaxInputLengthFeatureSchema = exports.RequestsQuotaFeatureSchema = exports.AiModelAccessFeatureSchema = exports.SubscriptionFeatureBaseSchema = void 0;
|
|
4
4
|
const constants_1 = require("../constants");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
exports.SubscriptionFeatureBaseSchema = zod_1.z.object({
|
|
@@ -38,8 +38,12 @@ exports.MaxInputLengthFeatureSchema = exports.SubscriptionFeatureBaseSchema.exte
|
|
|
38
38
|
maxInputLength: zod_1.z.number(),
|
|
39
39
|
}),
|
|
40
40
|
});
|
|
41
|
+
exports.WebSearchFeatureSchema = exports.SubscriptionFeatureBaseSchema.extend({
|
|
42
|
+
type: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_TYPE.WEB_SEARCH),
|
|
43
|
+
});
|
|
41
44
|
exports.SubscriptionFeatureSchema = zod_1.z.union([
|
|
42
45
|
exports.AiModelAccessFeatureSchema,
|
|
43
46
|
exports.RequestsQuotaFeatureSchema,
|
|
44
47
|
exports.MaxInputLengthFeatureSchema,
|
|
48
|
+
exports.WebSearchFeatureSchema,
|
|
45
49
|
]);
|
|
@@ -1155,4 +1155,14 @@ export const ERRORS = {
|
|
|
1155
1155
|
message: 'ИИ модель не поддерживает поиск в интернете',
|
|
1156
1156
|
httpCode: 400,
|
|
1157
1157
|
},
|
|
1158
|
+
WEB_SEARCH_NOT_AVAILABLE_TO_USER: {
|
|
1159
|
+
code: 'A251',
|
|
1160
|
+
message: 'Поиск в интернете не доступен данному пользователю',
|
|
1161
|
+
httpCode: 403,
|
|
1162
|
+
},
|
|
1163
|
+
CHAT_FILE_ATTACHMENT_NOT_ALLOWED: {
|
|
1164
|
+
code: 'A252',
|
|
1165
|
+
message: 'Незарегистрированный юзер не может прикреплять файлы',
|
|
1166
|
+
httpCode: 400,
|
|
1167
|
+
},
|
|
1158
1168
|
};
|
|
@@ -40,10 +40,15 @@ export const MaxInputLengthFeatureSchema = SubscriptionFeatureBaseSchema.extend(
|
|
|
40
40
|
}),
|
|
41
41
|
});
|
|
42
42
|
|
|
43
|
+
export const WebSearchFeatureSchema = SubscriptionFeatureBaseSchema.extend({
|
|
44
|
+
type: z.literal(SUBSCRIPTION_FEATURE_TYPE.WEB_SEARCH),
|
|
45
|
+
});
|
|
46
|
+
|
|
43
47
|
export const SubscriptionFeatureSchema = z.union([
|
|
44
48
|
AiModelAccessFeatureSchema,
|
|
45
49
|
RequestsQuotaFeatureSchema,
|
|
46
50
|
MaxInputLengthFeatureSchema,
|
|
51
|
+
WebSearchFeatureSchema,
|
|
47
52
|
]);
|
|
48
53
|
|
|
49
54
|
export type SubscriptionFeature = z.infer<typeof SubscriptionFeatureSchema>;
|