@purpleschool/gptbot 0.5.72 → 0.5.74
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-last-active-chat-command.js +1 -3
- package/build/commands/tools-paraphrase/paraphrase.command.js +1 -1
- package/build/models/chat.schema.js +2 -0
- package/commands/chat/get-last-active-chat-command.ts +2 -4
- package/commands/tools-paraphrase/paraphrase.command.ts +1 -1
- package/models/chat.schema.ts +2 -0
- package/package.json +1 -1
|
@@ -10,8 +10,6 @@ var GetLastActiveChatCommand;
|
|
|
10
10
|
aIModelId: true,
|
|
11
11
|
});
|
|
12
12
|
GetLastActiveChatCommand.Response = zod_1.z.object({
|
|
13
|
-
data: models_1.ChatSchema
|
|
14
|
-
messages: zod_1.z.array(models_1.MessageSchema),
|
|
15
|
-
}),
|
|
13
|
+
data: models_1.ChatSchema,
|
|
16
14
|
});
|
|
17
15
|
})(GetLastActiveChatCommand || (exports.GetLastActiveChatCommand = GetLastActiveChatCommand = {}));
|
|
@@ -9,7 +9,7 @@ var ParaphraseCommand;
|
|
|
9
9
|
ParaphraseCommand.RequestSchema = zod_1.z.object({
|
|
10
10
|
styleId: zod_1.z.string().uuid(),
|
|
11
11
|
typeId: zod_1.z.string().uuid(),
|
|
12
|
-
prompt: zod_1.z.string().min(1).max(
|
|
12
|
+
prompt: zod_1.z.string().min(1).max(100000),
|
|
13
13
|
intensity: zod_1.z.nativeEnum(constants_1.PARAPHRASING_INTENSITY),
|
|
14
14
|
});
|
|
15
15
|
ParaphraseCommand.ResponseSchema = zod_1.z.object({
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ChatSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
|
+
const message_schema_1 = require("./message.schema");
|
|
6
7
|
exports.ChatSchema = zod_1.z.object({
|
|
7
8
|
uuid: zod_1.z.string().uuid(),
|
|
8
9
|
userId: zod_1.z.nullable(zod_1.z.string().uuid()),
|
|
@@ -11,6 +12,7 @@ exports.ChatSchema = zod_1.z.object({
|
|
|
11
12
|
aIModelId: zod_1.z.string().uuid(),
|
|
12
13
|
title: zod_1.z.string(),
|
|
13
14
|
chatStatus: zod_1.z.enum(Object.values(constants_1.CHAT_STATUS_ENUM)),
|
|
15
|
+
messages: zod_1.z.array(message_schema_1.MessageSchema),
|
|
14
16
|
createdAt: zod_1.z.date(),
|
|
15
17
|
updatedAt: zod_1.z.date(),
|
|
16
18
|
deletedAt: zod_1.z.nullable(zod_1.z.date()),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChatSchema
|
|
1
|
+
import { ChatSchema } from '../../models';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
export namespace GetLastActiveChatCommand {
|
|
@@ -8,9 +8,7 @@ export namespace GetLastActiveChatCommand {
|
|
|
8
8
|
});
|
|
9
9
|
|
|
10
10
|
export const Response = z.object({
|
|
11
|
-
data: ChatSchema
|
|
12
|
-
messages: z.array(MessageSchema),
|
|
13
|
-
}),
|
|
11
|
+
data: ChatSchema,
|
|
14
12
|
});
|
|
15
13
|
|
|
16
14
|
export type Response = z.infer<typeof Response>;
|
|
@@ -6,7 +6,7 @@ export namespace ParaphraseCommand {
|
|
|
6
6
|
export const RequestSchema = z.object({
|
|
7
7
|
styleId: z.string().uuid(),
|
|
8
8
|
typeId: z.string().uuid(),
|
|
9
|
-
prompt: z.string().min(1).max(
|
|
9
|
+
prompt: z.string().min(1).max(100000),
|
|
10
10
|
intensity: z.nativeEnum(PARAPHRASING_INTENSITY),
|
|
11
11
|
});
|
|
12
12
|
|
package/models/chat.schema.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { CHAT_STATUS_ENUM, TChatStatusEnum } from '../constants';
|
|
3
|
+
import { MessageSchema } from './message.schema';
|
|
3
4
|
|
|
4
5
|
export const ChatSchema = z.object({
|
|
5
6
|
uuid: z.string().uuid(),
|
|
@@ -9,6 +10,7 @@ export const ChatSchema = z.object({
|
|
|
9
10
|
aIModelId: z.string().uuid(),
|
|
10
11
|
title: z.string(),
|
|
11
12
|
chatStatus: z.enum(Object.values(CHAT_STATUS_ENUM) as [TChatStatusEnum]),
|
|
13
|
+
messages: z.array(MessageSchema),
|
|
12
14
|
|
|
13
15
|
createdAt: z.date(),
|
|
14
16
|
updatedAt: z.date(),
|