@purpleschool/gptbot 0.13.35 → 0.13.36
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/tools/tts/tts.command.js +5 -0
- package/build/constants/ai-model/enums/ai-model-tag.enum.js +7 -0
- package/build/constants/ai-model/enums/index.js +1 -0
- package/build/models/ai-model.schema.js +4 -0
- package/commands/tools/tts/tts.command.ts +6 -0
- package/constants/ai-model/enums/ai-model-tag.enum.ts +3 -0
- package/constants/ai-model/enums/index.ts +1 -0
- package/models/ai-model.schema.ts +5 -1
- package/package.json +1 -1
|
@@ -3,6 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TTSCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const models_1 = require("../../../models");
|
|
6
|
+
const TTSReferenceSchema = zod_1.z.object({
|
|
7
|
+
audioUrl: zod_1.z.string().url(),
|
|
8
|
+
text: zod_1.z.string(),
|
|
9
|
+
});
|
|
6
10
|
var TTSCommand;
|
|
7
11
|
(function (TTSCommand) {
|
|
8
12
|
TTSCommand.RequestSchema = zod_1.z.object({
|
|
@@ -19,6 +23,7 @@ var TTSCommand;
|
|
|
19
23
|
})
|
|
20
24
|
.optional()
|
|
21
25
|
.default({}),
|
|
26
|
+
references: zod_1.z.array(TTSReferenceSchema).optional().default([]),
|
|
22
27
|
});
|
|
23
28
|
TTSCommand.ResponseSchema = zod_1.z.object({
|
|
24
29
|
data: models_1.ToolJobSchema,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AI_MODEL_TAG = void 0;
|
|
4
|
+
var AI_MODEL_TAG;
|
|
5
|
+
(function (AI_MODEL_TAG) {
|
|
6
|
+
AI_MODEL_TAG["RECOMMENDED"] = "recommended";
|
|
7
|
+
})(AI_MODEL_TAG || (exports.AI_MODEL_TAG = AI_MODEL_TAG = {}));
|
|
@@ -18,3 +18,4 @@ __exportStar(require("./ai-model-config-selector-type.enum"), exports);
|
|
|
18
18
|
__exportStar(require("./ai-model-feature.enum"), exports);
|
|
19
19
|
__exportStar(require("./ai-model-status.enum"), exports);
|
|
20
20
|
__exportStar(require("./ai-model-strategy.enum"), exports);
|
|
21
|
+
__exportStar(require("./ai-model-tag.enum"), exports);
|
|
@@ -13,6 +13,8 @@ exports.AiModelSchema = zod_1.z.object({
|
|
|
13
13
|
tokenMultiplicator: zod_1.z.number(),
|
|
14
14
|
freeTokenMultiplicator: zod_1.z.number(),
|
|
15
15
|
order: zod_1.z.number(),
|
|
16
|
+
tags: zod_1.z.array(zod_1.z.nativeEnum(constants_1.AI_MODEL_TAG)),
|
|
17
|
+
hint: zod_1.z.string().nullable(),
|
|
16
18
|
canUse: zod_1.z.optional(zod_1.z.boolean()),
|
|
17
19
|
status: zod_1.z.nativeEnum(constants_1.AI_MODEL_STATUS),
|
|
18
20
|
features: zod_1.z.array(zod_1.z.nativeEnum(constants_1.AI_MODEL_FEATURE)),
|
|
@@ -33,6 +35,8 @@ exports.AiModelSchema = zod_1.z.object({
|
|
|
33
35
|
updatedAt: zod_1.z.date(),
|
|
34
36
|
});
|
|
35
37
|
exports.CreateAiModelSchema = exports.AiModelSchema.extend({
|
|
38
|
+
tags: zod_1.z.array(zod_1.z.nativeEnum(constants_1.AI_MODEL_TAG)).default([]),
|
|
39
|
+
hint: zod_1.z.string().nullable().default(null),
|
|
36
40
|
model: zod_1.z.string(),
|
|
37
41
|
maxInputTokens: zod_1.z.number(),
|
|
38
42
|
});
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ToolJobSchema } from '../../../models';
|
|
3
3
|
|
|
4
|
+
const TTSReferenceSchema = z.object({
|
|
5
|
+
audioUrl: z.string().url(),
|
|
6
|
+
text: z.string(),
|
|
7
|
+
});
|
|
8
|
+
|
|
4
9
|
export namespace TTSCommand {
|
|
5
10
|
export const RequestSchema = z.object({
|
|
6
11
|
modelId: z.string().uuid(),
|
|
@@ -16,6 +21,7 @@ export namespace TTSCommand {
|
|
|
16
21
|
})
|
|
17
22
|
.optional()
|
|
18
23
|
.default({}),
|
|
24
|
+
references: z.array(TTSReferenceSchema).optional().default([]),
|
|
19
25
|
});
|
|
20
26
|
|
|
21
27
|
export type Request = z.infer<typeof RequestSchema>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { AI_MODEL_FEATURE, AI_MODEL_STATUS } from '../constants';
|
|
2
|
+
import { AI_MODEL_FEATURE, AI_MODEL_STATUS, AI_MODEL_TAG } from '../constants';
|
|
3
3
|
import { AiModelConfigSchema } from './ai-model-config.schema';
|
|
4
4
|
|
|
5
5
|
export const AiModelSchema = z.object({
|
|
@@ -11,6 +11,8 @@ export const AiModelSchema = z.object({
|
|
|
11
11
|
tokenMultiplicator: z.number(),
|
|
12
12
|
freeTokenMultiplicator: z.number(),
|
|
13
13
|
order: z.number(),
|
|
14
|
+
tags: z.array(z.nativeEnum(AI_MODEL_TAG)),
|
|
15
|
+
hint: z.string().nullable(),
|
|
14
16
|
canUse: z.optional(z.boolean()),
|
|
15
17
|
status: z.nativeEnum(AI_MODEL_STATUS),
|
|
16
18
|
features: z.array(z.nativeEnum(AI_MODEL_FEATURE)),
|
|
@@ -34,6 +36,8 @@ export const AiModelSchema = z.object({
|
|
|
34
36
|
export type AiModel = z.infer<typeof AiModelSchema>;
|
|
35
37
|
|
|
36
38
|
export const CreateAiModelSchema = AiModelSchema.extend({
|
|
39
|
+
tags: z.array(z.nativeEnum(AI_MODEL_TAG)).default([]),
|
|
40
|
+
hint: z.string().nullable().default(null),
|
|
37
41
|
model: z.string(),
|
|
38
42
|
maxInputTokens: z.number(),
|
|
39
43
|
});
|