@botonic/plugin-ai-agents 0.55.0 → 0.56.0-alpha.0
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/lib/cjs/structured-output/index.d.ts +10 -0
- package/lib/cjs/structured-output/index.js +2 -0
- package/lib/cjs/structured-output/index.js.map +1 -1
- package/lib/cjs/structured-output/request-contact-info.d.ts +9 -0
- package/lib/cjs/structured-output/request-contact-info.js +14 -0
- package/lib/cjs/structured-output/request-contact-info.js.map +1 -0
- package/lib/esm/structured-output/index.d.ts +10 -0
- package/lib/esm/structured-output/index.js +2 -0
- package/lib/esm/structured-output/index.js.map +1 -1
- package/lib/esm/structured-output/request-contact-info.d.ts +9 -0
- package/lib/esm/structured-output/request-contact-info.js +14 -0
- package/lib/esm/structured-output/request-contact-info.js.map +1 -0
- package/package.json +2 -2
- package/src/structured-output/index.ts +2 -0
- package/src/structured-output/request-contact-info.ts +18 -0
|
@@ -47,6 +47,11 @@ export declare const OutputSchema: z.ZodObject<{
|
|
|
47
47
|
payload: z.ZodString;
|
|
48
48
|
}, z.core.$strip>>;
|
|
49
49
|
}, z.core.$strip>;
|
|
50
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
51
|
+
type: z.ZodLiteral<import("@botonic/core").OutputMessageType.RequestContactInfo>;
|
|
52
|
+
content: z.ZodObject<{
|
|
53
|
+
text: z.ZodString;
|
|
54
|
+
}, z.core.$strip>;
|
|
50
55
|
}, z.core.$strip>]>>;
|
|
51
56
|
}, z.core.$strip>;
|
|
52
57
|
export declare function getOutputSchema(externalOutputMessagesSchemas: z.ZodObject<any>[]): z.ZodObject<{
|
|
@@ -93,6 +98,11 @@ export declare function getOutputSchema(externalOutputMessagesSchemas: z.ZodObje
|
|
|
93
98
|
payload: z.ZodString;
|
|
94
99
|
}, z.core.$strip>>;
|
|
95
100
|
}, z.core.$strip>;
|
|
101
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
102
|
+
type: z.ZodLiteral<import("@botonic/core").OutputMessageType.RequestContactInfo>;
|
|
103
|
+
content: z.ZodObject<{
|
|
104
|
+
text: z.ZodString;
|
|
105
|
+
}, z.core.$strip>;
|
|
96
106
|
}, z.core.$strip>, ...z.ZodObject<any, z.core.$strip>[]]>>;
|
|
97
107
|
}, z.core.$strip>;
|
|
98
108
|
export declare function getOutputInstructions(): string;
|
|
@@ -7,6 +7,7 @@ const zod_1 = require("zod");
|
|
|
7
7
|
const bot_executor_1 = require("./bot-executor");
|
|
8
8
|
const carousel_1 = require("./carousel");
|
|
9
9
|
const exit_1 = require("./exit");
|
|
10
|
+
const request_contact_info_1 = require("./request-contact-info");
|
|
10
11
|
const text_1 = require("./text");
|
|
11
12
|
const text_with_buttons_1 = require("./text-with-buttons");
|
|
12
13
|
const baseMessageSchemas = [
|
|
@@ -15,6 +16,7 @@ const baseMessageSchemas = [
|
|
|
15
16
|
carousel_1.CarouselSchema,
|
|
16
17
|
exit_1.ExitSchema,
|
|
17
18
|
bot_executor_1.BotExecutorSchema,
|
|
19
|
+
request_contact_info_1.RequestContactInfoSchema,
|
|
18
20
|
];
|
|
19
21
|
exports.OutputSchema = zod_1.z
|
|
20
22
|
.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/structured-output/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/structured-output/index.ts"],"names":[],"mappings":";;;AA2BA,0CAQC;AAED,sDAaC;AAjDD,6BAAuB;AACvB,iDAAkD;AAClD,yCAA2C;AAC3C,iCAAmC;AACnC,iEAAiE;AACjE,iCAAmC;AACnC,2DAA2D;AAM3D,MAAM,kBAAkB,GAAG;IACzB,iBAAU;IACV,yCAAqB;IACrB,yBAAc;IACd,iBAAU;IACV,gCAAiB;IACjB,+CAAwB;CAChB,CAAA;AACG,QAAA,YAAY,GAAG,OAAC;KAC1B,MAAM,CAAC;IACN,QAAQ,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;CAC/C,CAAC;KACD,QAAQ,CAAC,qCAAqC,CAAC,CAAA;AAElD,SAAgB,eAAe,CAC7B,6BAAiD;IAEjD,OAAO,OAAC,CAAC,MAAM,CAAC;QACd,QAAQ,EAAE,OAAC,CAAC,KAAK,CACf,OAAC,CAAC,KAAK,CAAC,CAAC,GAAG,kBAAkB,EAAE,GAAG,6BAA6B,CAAC,CAAC,CACnE;KACF,CAAC,CAAA;AACJ,CAAC;AAED,SAAgB,qBAAqB;IACnC,MAAM,OAAO,GAAG;QACd,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE;oBACP,IAAI,EAAE,kCAAkC;iBACzC;aACF;SACF;KACF,CAAA;IACD,MAAM,MAAM,GAAG,yIAAyI,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,cAAc,CAAA;IAC7L,OAAO,aAAa,MAAM,aAAa,CAAA;AACzC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { OutputMessageType, type RequestContactInfoMessage } from '@botonic/core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export type { RequestContactInfoMessage };
|
|
4
|
+
export declare const RequestContactInfoSchema: z.ZodObject<{
|
|
5
|
+
type: z.ZodLiteral<OutputMessageType.RequestContactInfo>;
|
|
6
|
+
content: z.ZodObject<{
|
|
7
|
+
text: z.ZodString;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RequestContactInfoSchema = void 0;
|
|
4
|
+
const core_1 = require("@botonic/core");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
exports.RequestContactInfoSchema = zod_1.z
|
|
7
|
+
.object({
|
|
8
|
+
type: zod_1.z.literal(core_1.OutputMessageType.RequestContactInfo),
|
|
9
|
+
content: zod_1.z.object({
|
|
10
|
+
text: zod_1.z.string().describe('The text of the message'),
|
|
11
|
+
}),
|
|
12
|
+
})
|
|
13
|
+
.describe('A message to request phone number from the user. Use it only when asked explicitly in the prompt.');
|
|
14
|
+
//# sourceMappingURL=request-contact-info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-contact-info.js","sourceRoot":"","sources":["../../../src/structured-output/request-contact-info.ts"],"names":[],"mappings":";;;AAAA,wCAGsB;AACtB,6BAAuB;AAIV,QAAA,wBAAwB,GAAG,OAAC;KACtC,MAAM,CAAC;IACN,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,wBAAiB,CAAC,kBAAkB,CAAC;IACrD,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;QAChB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC;KACrD,CAAC;CACH,CAAC;KACD,QAAQ,CACP,mGAAmG,CACpG,CAAA"}
|
|
@@ -47,6 +47,11 @@ export declare const OutputSchema: z.ZodObject<{
|
|
|
47
47
|
payload: z.ZodString;
|
|
48
48
|
}, z.core.$strip>>;
|
|
49
49
|
}, z.core.$strip>;
|
|
50
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
51
|
+
type: z.ZodLiteral<import("@botonic/core").OutputMessageType.RequestContactInfo>;
|
|
52
|
+
content: z.ZodObject<{
|
|
53
|
+
text: z.ZodString;
|
|
54
|
+
}, z.core.$strip>;
|
|
50
55
|
}, z.core.$strip>]>>;
|
|
51
56
|
}, z.core.$strip>;
|
|
52
57
|
export declare function getOutputSchema(externalOutputMessagesSchemas: z.ZodObject<any>[]): z.ZodObject<{
|
|
@@ -93,6 +98,11 @@ export declare function getOutputSchema(externalOutputMessagesSchemas: z.ZodObje
|
|
|
93
98
|
payload: z.ZodString;
|
|
94
99
|
}, z.core.$strip>>;
|
|
95
100
|
}, z.core.$strip>;
|
|
101
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
102
|
+
type: z.ZodLiteral<import("@botonic/core").OutputMessageType.RequestContactInfo>;
|
|
103
|
+
content: z.ZodObject<{
|
|
104
|
+
text: z.ZodString;
|
|
105
|
+
}, z.core.$strip>;
|
|
96
106
|
}, z.core.$strip>, ...z.ZodObject<any, z.core.$strip>[]]>>;
|
|
97
107
|
}, z.core.$strip>;
|
|
98
108
|
export declare function getOutputInstructions(): string;
|
|
@@ -7,6 +7,7 @@ const zod_1 = require("zod");
|
|
|
7
7
|
const bot_executor_1 = require("./bot-executor");
|
|
8
8
|
const carousel_1 = require("./carousel");
|
|
9
9
|
const exit_1 = require("./exit");
|
|
10
|
+
const request_contact_info_1 = require("./request-contact-info");
|
|
10
11
|
const text_1 = require("./text");
|
|
11
12
|
const text_with_buttons_1 = require("./text-with-buttons");
|
|
12
13
|
const baseMessageSchemas = [
|
|
@@ -15,6 +16,7 @@ const baseMessageSchemas = [
|
|
|
15
16
|
carousel_1.CarouselSchema,
|
|
16
17
|
exit_1.ExitSchema,
|
|
17
18
|
bot_executor_1.BotExecutorSchema,
|
|
19
|
+
request_contact_info_1.RequestContactInfoSchema,
|
|
18
20
|
];
|
|
19
21
|
exports.OutputSchema = zod_1.z
|
|
20
22
|
.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/structured-output/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/structured-output/index.ts"],"names":[],"mappings":";;;AA2BA,0CAQC;AAED,sDAaC;AAjDD,6BAAuB;AACvB,iDAAkD;AAClD,yCAA2C;AAC3C,iCAAmC;AACnC,iEAAiE;AACjE,iCAAmC;AACnC,2DAA2D;AAM3D,MAAM,kBAAkB,GAAG;IACzB,iBAAU;IACV,yCAAqB;IACrB,yBAAc;IACd,iBAAU;IACV,gCAAiB;IACjB,+CAAwB;CAChB,CAAA;AACG,QAAA,YAAY,GAAG,OAAC;KAC1B,MAAM,CAAC;IACN,QAAQ,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;CAC/C,CAAC;KACD,QAAQ,CAAC,qCAAqC,CAAC,CAAA;AAElD,SAAgB,eAAe,CAC7B,6BAAiD;IAEjD,OAAO,OAAC,CAAC,MAAM,CAAC;QACd,QAAQ,EAAE,OAAC,CAAC,KAAK,CACf,OAAC,CAAC,KAAK,CAAC,CAAC,GAAG,kBAAkB,EAAE,GAAG,6BAA6B,CAAC,CAAC,CACnE;KACF,CAAC,CAAA;AACJ,CAAC;AAED,SAAgB,qBAAqB;IACnC,MAAM,OAAO,GAAG;QACd,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE;oBACP,IAAI,EAAE,kCAAkC;iBACzC;aACF;SACF;KACF,CAAA;IACD,MAAM,MAAM,GAAG,yIAAyI,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,cAAc,CAAA;IAC7L,OAAO,aAAa,MAAM,aAAa,CAAA;AACzC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { OutputMessageType, type RequestContactInfoMessage } from '@botonic/core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export type { RequestContactInfoMessage };
|
|
4
|
+
export declare const RequestContactInfoSchema: z.ZodObject<{
|
|
5
|
+
type: z.ZodLiteral<OutputMessageType.RequestContactInfo>;
|
|
6
|
+
content: z.ZodObject<{
|
|
7
|
+
text: z.ZodString;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RequestContactInfoSchema = void 0;
|
|
4
|
+
const core_1 = require("@botonic/core");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
exports.RequestContactInfoSchema = zod_1.z
|
|
7
|
+
.object({
|
|
8
|
+
type: zod_1.z.literal(core_1.OutputMessageType.RequestContactInfo),
|
|
9
|
+
content: zod_1.z.object({
|
|
10
|
+
text: zod_1.z.string().describe('The text of the message'),
|
|
11
|
+
}),
|
|
12
|
+
})
|
|
13
|
+
.describe('A message to request phone number from the user. Use it only when asked explicitly in the prompt.');
|
|
14
|
+
//# sourceMappingURL=request-contact-info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-contact-info.js","sourceRoot":"","sources":["../../../src/structured-output/request-contact-info.ts"],"names":[],"mappings":";;;AAAA,wCAGsB;AACtB,6BAAuB;AAIV,QAAA,wBAAwB,GAAG,OAAC;KACtC,MAAM,CAAC;IACN,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,wBAAiB,CAAC,kBAAkB,CAAC;IACrD,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;QAChB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC;KACrD,CAAC;CACH,CAAC;KACD,QAAQ,CACP,mGAAmG,CACpG,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botonic/plugin-ai-agents",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.56.0-alpha.0",
|
|
4
4
|
"main": "./lib/cjs/index.js",
|
|
5
5
|
"module": "./lib/esm/index.js",
|
|
6
6
|
"description": "Use AI Agents to generate your contents",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"format": "biome format --write src/ tests/"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@botonic/core": "^0.
|
|
17
|
+
"@botonic/core": "^0.56.0-alpha.0",
|
|
18
18
|
"@openai/agents": "^0.10.1",
|
|
19
19
|
"axios": "^1.18.1",
|
|
20
20
|
"openai": "^6.36.0",
|
|
@@ -3,6 +3,7 @@ import { z } from 'zod'
|
|
|
3
3
|
import { BotExecutorSchema } from './bot-executor'
|
|
4
4
|
import { CarouselSchema } from './carousel'
|
|
5
5
|
import { ExitSchema } from './exit'
|
|
6
|
+
import { RequestContactInfoSchema } from './request-contact-info'
|
|
6
7
|
import { TextSchema } from './text'
|
|
7
8
|
import { TextWithButtonsSchema } from './text-with-buttons'
|
|
8
9
|
|
|
@@ -16,6 +17,7 @@ const baseMessageSchemas = [
|
|
|
16
17
|
CarouselSchema,
|
|
17
18
|
ExitSchema,
|
|
18
19
|
BotExecutorSchema,
|
|
20
|
+
RequestContactInfoSchema,
|
|
19
21
|
] as const
|
|
20
22
|
export const OutputSchema = z
|
|
21
23
|
.object({
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
OutputMessageType,
|
|
3
|
+
type RequestContactInfoMessage,
|
|
4
|
+
} from '@botonic/core'
|
|
5
|
+
import { z } from 'zod'
|
|
6
|
+
|
|
7
|
+
export type { RequestContactInfoMessage }
|
|
8
|
+
|
|
9
|
+
export const RequestContactInfoSchema = z
|
|
10
|
+
.object({
|
|
11
|
+
type: z.literal(OutputMessageType.RequestContactInfo),
|
|
12
|
+
content: z.object({
|
|
13
|
+
text: z.string().describe('The text of the message'),
|
|
14
|
+
}),
|
|
15
|
+
})
|
|
16
|
+
.describe(
|
|
17
|
+
'A message to request phone number from the user. Use it only when asked explicitly in the prompt.'
|
|
18
|
+
)
|