@sap-ai-sdk/prompt-registry 1.11.1-20250414013204.0 → 1.11.1-20250415115505.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/README.md +3 -53
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/zod/chat-completion-tool.zod.d.ts +40 -0
- package/dist/zod/chat-completion-tool.zod.d.ts.map +1 -0
- package/dist/zod/chat-completion-tool.zod.js +11 -0
- package/dist/zod/chat-completion-tool.zod.js.map +1 -0
- package/dist/zod/function-object.zod.d.ts +21 -0
- package/dist/zod/function-object.zod.d.ts.map +1 -0
- package/dist/zod/function-object.zod.js +13 -0
- package/dist/zod/function-object.zod.js.map +1 -0
- package/dist/zod/function-parameters.zod.d.ts +6 -0
- package/dist/zod/function-parameters.zod.d.ts.map +1 -0
- package/dist/zod/function-parameters.zod.js +7 -0
- package/dist/zod/function-parameters.zod.js.map +1 -0
- package/dist/zod/image-content.zod.d.ts +30 -0
- package/dist/zod/image-content.zod.d.ts.map +1 -0
- package/dist/zod/image-content.zod.js +15 -0
- package/dist/zod/image-content.zod.js.map +1 -0
- package/dist/zod/multi-chat-content.zod.d.ts +39 -0
- package/dist/zod/multi-chat-content.zod.d.ts.map +1 -0
- package/dist/zod/multi-chat-content.zod.js +12 -0
- package/dist/zod/multi-chat-content.zod.js.map +1 -0
- package/dist/zod/multi-chat-template.zod.d.ts +66 -0
- package/dist/zod/multi-chat-template.zod.d.ts.map +1 -0
- package/dist/zod/multi-chat-template.zod.js +11 -0
- package/dist/zod/multi-chat-template.zod.js.map +1 -0
- package/dist/zod/prompt-template-post-request.zod.d.ts +569 -0
- package/dist/zod/prompt-template-post-request.zod.d.ts.map +1 -0
- package/dist/zod/prompt-template-post-request.zod.js +12 -0
- package/dist/zod/prompt-template-post-request.zod.js.map +1 -0
- package/dist/zod/prompt-template-spec.zod.d.ts +471 -0
- package/dist/zod/prompt-template-spec.zod.d.ts.map +1 -0
- package/dist/zod/prompt-template-spec.zod.js +26 -0
- package/dist/zod/prompt-template-spec.zod.js.map +1 -0
- package/dist/zod/response-format-json-object.zod.d.ts +12 -0
- package/dist/zod/response-format-json-object.zod.d.ts.map +1 -0
- package/dist/zod/response-format-json-object.zod.js +9 -0
- package/dist/zod/response-format-json-object.zod.js.map +1 -0
- package/dist/zod/response-format-json-schema-schema.zod.d.ts +6 -0
- package/dist/zod/response-format-json-schema-schema.zod.d.ts.map +1 -0
- package/dist/zod/response-format-json-schema-schema.zod.js +7 -0
- package/dist/zod/response-format-json-schema-schema.zod.js.map +1 -0
- package/dist/zod/response-format-json-schema.zod.d.ts +40 -0
- package/dist/zod/response-format-json-schema.zod.d.ts.map +1 -0
- package/dist/zod/response-format-json-schema.zod.js +16 -0
- package/dist/zod/response-format-json-schema.zod.js.map +1 -0
- package/dist/zod/response-format-text.zod.d.ts +12 -0
- package/dist/zod/response-format-text.zod.d.ts.map +1 -0
- package/dist/zod/response-format-text.zod.js +9 -0
- package/dist/zod/response-format-text.zod.js.map +1 -0
- package/dist/zod/single-chat-template.zod.d.ts +15 -0
- package/dist/zod/single-chat-template.zod.d.ts.map +1 -0
- package/dist/zod/single-chat-template.zod.js +10 -0
- package/dist/zod/single-chat-template.zod.js.map +1 -0
- package/dist/zod/template.zod.d.ts +75 -0
- package/dist/zod/template.zod.d.ts.map +1 -0
- package/dist/zod/template.zod.js +12 -0
- package/dist/zod/template.zod.js.map +1 -0
- package/dist/zod/text-content.zod.d.ts +15 -0
- package/dist/zod/text-content.zod.d.ts.map +1 -0
- package/dist/zod/text-content.zod.js +10 -0
- package/dist/zod/text-content.zod.js.map +1 -0
- package/package.json +8 -4
package/README.md
CHANGED
|
@@ -7,12 +7,7 @@ This package incorporates generative AI prompt registry capabilities into your A
|
|
|
7
7
|
### Table of Contents
|
|
8
8
|
|
|
9
9
|
- [Installation](#installation)
|
|
10
|
-
- [
|
|
11
|
-
- [Usage](#usage)
|
|
12
|
-
- [List Prompt Templates](#list-prompt-templates)
|
|
13
|
-
- [Custom Destination](#custom-destination)
|
|
14
|
-
- [Error Handling](#error-handling)
|
|
15
|
-
- [Local Testing](#local-testing)
|
|
10
|
+
- [Documentation](#documentation)
|
|
16
11
|
- [Support, Feedback, Contribution](#support-feedback-contribution)
|
|
17
12
|
- [License](#license)
|
|
18
13
|
|
|
@@ -22,54 +17,9 @@ This package incorporates generative AI prompt registry capabilities into your A
|
|
|
22
17
|
$ npm install @sap-ai-sdk/prompt-registry
|
|
23
18
|
```
|
|
24
19
|
|
|
25
|
-
##
|
|
20
|
+
## Documentation
|
|
26
21
|
|
|
27
|
-
|
|
28
|
-
- Configure the project with **Node.js v20 or higher** and **native ESM** support.
|
|
29
|
-
|
|
30
|
-
> **Accessing the AI Core Service via the SDK**
|
|
31
|
-
>
|
|
32
|
-
> The SDK automatically retrieves the `AI Core` service credentials and resolves the access token needed for authentication.
|
|
33
|
-
>
|
|
34
|
-
> - In Cloud Foundry, it's accessed from the `VCAP_SERVICES` environment variable.
|
|
35
|
-
> - In Kubernetes / Kyma environments, you have to mount the service binding as a secret instead, for more information refer to [this documentation](https://www.npmjs.com/package/@sap/xsenv#usage-in-kubernetes).
|
|
36
|
-
|
|
37
|
-
## Usage
|
|
38
|
-
|
|
39
|
-
The example below demonstrate a sample usage of APIs in SAP AI Core prompt registry service.
|
|
40
|
-
|
|
41
|
-
In addition, you can find more **sample code** [here](https://github.com/SAP/ai-sdk-js/blob/main/sample-code/src/prompt-registry.ts).
|
|
42
|
-
|
|
43
|
-
### List Prompt Templates
|
|
44
|
-
|
|
45
|
-
```ts
|
|
46
|
-
const response: PromptTemplateListResponse =
|
|
47
|
-
await PromptTemplatesApi.listPromptTemplates({
|
|
48
|
-
scenario: 'test'
|
|
49
|
-
}).execute();
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### Custom Destination
|
|
53
|
-
|
|
54
|
-
When calling the `execute()` method, it is possible to provide a custom destination.
|
|
55
|
-
For example, when querying deployments targeting a destination with the name `my-destination`, the following code can be used:
|
|
56
|
-
|
|
57
|
-
```ts
|
|
58
|
-
const response: PromptTemplateListResponse =
|
|
59
|
-
await PromptTemplatesApi.listPromptTemplates({
|
|
60
|
-
scenario: 'test'
|
|
61
|
-
}).execute({
|
|
62
|
-
destinationName: 'my-destination'
|
|
63
|
-
});
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
## Error Handling
|
|
67
|
-
|
|
68
|
-
For error handling instructions, refer to this [section](https://github.com/SAP/ai-sdk-js/blob/main/README.md#error-handling).
|
|
69
|
-
|
|
70
|
-
## Local Testing
|
|
71
|
-
|
|
72
|
-
For local testing instructions, refer to this [section](https://github.com/SAP/ai-sdk-js/blob/main/README.md#local-testing).
|
|
22
|
+
Visit the [SAP Cloud SDK for AI (JavaScript)](https://sap.github.io/ai-sdk/docs/js/overview-cloud-sdk-for-ai-js) documentation portal to learn more about its capabilities and detailed usage.
|
|
73
23
|
|
|
74
24
|
## Support, Feedback, Contribution
|
|
75
25
|
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAElD,OAAO,EAAE,+BAA+B,EAAE,MAAM,2CAA2C,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,sDAAsD;AACtD,OAAO,EAAE,+BAA+B,EAAE,MAAM,2CAA2C,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
**/
|
|
5
|
+
export declare const chatCompletionToolSchema: z.ZodObject<{
|
|
6
|
+
type: z.ZodLiteral<"function">;
|
|
7
|
+
function: z.ZodObject<{
|
|
8
|
+
description: z.ZodOptional<z.ZodString>;
|
|
9
|
+
name: z.ZodString;
|
|
10
|
+
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
11
|
+
strict: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
name: string;
|
|
14
|
+
description?: string | undefined;
|
|
15
|
+
strict?: boolean | null | undefined;
|
|
16
|
+
parameters?: Record<string, any> | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
name: string;
|
|
19
|
+
description?: string | undefined;
|
|
20
|
+
strict?: boolean | null | undefined;
|
|
21
|
+
parameters?: Record<string, any> | undefined;
|
|
22
|
+
}>;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
function: {
|
|
25
|
+
name: string;
|
|
26
|
+
description?: string | undefined;
|
|
27
|
+
strict?: boolean | null | undefined;
|
|
28
|
+
parameters?: Record<string, any> | undefined;
|
|
29
|
+
};
|
|
30
|
+
type: "function";
|
|
31
|
+
}, {
|
|
32
|
+
function: {
|
|
33
|
+
name: string;
|
|
34
|
+
description?: string | undefined;
|
|
35
|
+
strict?: boolean | null | undefined;
|
|
36
|
+
parameters?: Record<string, any> | undefined;
|
|
37
|
+
};
|
|
38
|
+
type: "function";
|
|
39
|
+
}>;
|
|
40
|
+
//# sourceMappingURL=chat-completion-tool.zod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-completion-tool.zod.d.ts","sourceRoot":"","sources":["../../src/zod/chat-completion-tool.zod.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;IAEI;AACJ,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGnC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Generated by ts-to-zod
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { functionObjectSchema } from './function-object.zod.js';
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
**/
|
|
7
|
+
export const chatCompletionToolSchema = z.object({
|
|
8
|
+
type: z.literal('function'),
|
|
9
|
+
function: functionObjectSchema
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=chat-completion-tool.zod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-completion-tool.zod.js","sourceRoot":"","sources":["../../src/zod/chat-completion-tool.zod.ts"],"names":[],"mappings":"AAAA,yBAAyB;AACzB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE;;IAEI;AACJ,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IAC3B,QAAQ,EAAE,oBAAoB;CAC/B,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
**/
|
|
5
|
+
export declare const functionObjectSchema: z.ZodObject<{
|
|
6
|
+
description: z.ZodOptional<z.ZodString>;
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
9
|
+
strict: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
name: string;
|
|
12
|
+
description?: string | undefined;
|
|
13
|
+
strict?: boolean | null | undefined;
|
|
14
|
+
parameters?: Record<string, any> | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
name: string;
|
|
17
|
+
description?: string | undefined;
|
|
18
|
+
strict?: boolean | null | undefined;
|
|
19
|
+
parameters?: Record<string, any> | undefined;
|
|
20
|
+
}>;
|
|
21
|
+
//# sourceMappingURL=function-object.zod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function-object.zod.d.ts","sourceRoot":"","sources":["../../src/zod/function-object.zod.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;IAEI;AACJ,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;EAK/B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Generated by ts-to-zod
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { functionParametersSchema } from './function-parameters.zod.js';
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
**/
|
|
7
|
+
export const functionObjectSchema = z.object({
|
|
8
|
+
description: z.string().optional(),
|
|
9
|
+
name: z.string(),
|
|
10
|
+
parameters: functionParametersSchema.optional(),
|
|
11
|
+
strict: z.boolean().optional().nullable()
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=function-object.zod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function-object.zod.js","sourceRoot":"","sources":["../../src/zod/function-object.zod.ts"],"names":[],"mappings":"AAAA,yBAAyB;AACzB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAExE;;IAEI;AACJ,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,UAAU,EAAE,wBAAwB,CAAC,QAAQ,EAAE;IAC/C,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAC1C,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function-parameters.zod.d.ts","sourceRoot":"","sources":["../../src/zod/function-parameters.zod.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;IAEI;AACJ,eAAO,MAAM,wBAAwB,oCAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function-parameters.zod.js","sourceRoot":"","sources":["../../src/zod/function-parameters.zod.ts"],"names":[],"mappings":"AAAA,yBAAyB;AACzB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;IAEI;AACJ,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
**/
|
|
5
|
+
export declare const imageContentSchema: z.ZodIntersection<z.ZodObject<{
|
|
6
|
+
type: z.ZodLiteral<"image_url">;
|
|
7
|
+
image_url: z.ZodObject<{
|
|
8
|
+
url: z.ZodString;
|
|
9
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
url: string;
|
|
12
|
+
detail?: string | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
url: string;
|
|
15
|
+
detail?: string | undefined;
|
|
16
|
+
}>;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
image_url: {
|
|
19
|
+
url: string;
|
|
20
|
+
detail?: string | undefined;
|
|
21
|
+
};
|
|
22
|
+
type: "image_url";
|
|
23
|
+
}, {
|
|
24
|
+
image_url: {
|
|
25
|
+
url: string;
|
|
26
|
+
detail?: string | undefined;
|
|
27
|
+
};
|
|
28
|
+
type: "image_url";
|
|
29
|
+
}>, z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
30
|
+
//# sourceMappingURL=image-content.zod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-content.zod.d.ts","sourceRoot":"","sources":["../../src/zod/image-content.zod.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;IAEI;AACJ,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;uCAQN,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Generated by ts-to-zod
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
**/
|
|
6
|
+
export const imageContentSchema = z
|
|
7
|
+
.object({
|
|
8
|
+
type: z.literal('image_url'),
|
|
9
|
+
image_url: z.object({
|
|
10
|
+
url: z.string(),
|
|
11
|
+
detail: z.string().optional()
|
|
12
|
+
})
|
|
13
|
+
})
|
|
14
|
+
.and(z.record(z.any()));
|
|
15
|
+
//# sourceMappingURL=image-content.zod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-content.zod.js","sourceRoot":"","sources":["../../src/zod/image-content.zod.ts"],"names":[],"mappings":"AAAA,yBAAyB;AACzB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;IAEI;AACJ,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC;KAChC,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;IAC5B,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC;QAClB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;QACf,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC9B,CAAC;CACH,CAAC;KACD,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
**/
|
|
5
|
+
export declare const multiChatContentSchema: z.ZodUnion<[z.ZodIntersection<z.ZodObject<{
|
|
6
|
+
type: z.ZodLiteral<"image_url">;
|
|
7
|
+
image_url: z.ZodObject<{
|
|
8
|
+
url: z.ZodString;
|
|
9
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
url: string;
|
|
12
|
+
detail?: string | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
url: string;
|
|
15
|
+
detail?: string | undefined;
|
|
16
|
+
}>;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
image_url: {
|
|
19
|
+
url: string;
|
|
20
|
+
detail?: string | undefined;
|
|
21
|
+
};
|
|
22
|
+
type: "image_url";
|
|
23
|
+
}, {
|
|
24
|
+
image_url: {
|
|
25
|
+
url: string;
|
|
26
|
+
detail?: string | undefined;
|
|
27
|
+
};
|
|
28
|
+
type: "image_url";
|
|
29
|
+
}>, z.ZodRecord<z.ZodString, z.ZodAny>>, z.ZodObject<{
|
|
30
|
+
type: z.ZodLiteral<"text">;
|
|
31
|
+
text: z.ZodString;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
text: string;
|
|
34
|
+
type: "text";
|
|
35
|
+
}, {
|
|
36
|
+
text: string;
|
|
37
|
+
type: "text";
|
|
38
|
+
}>]>;
|
|
39
|
+
//# sourceMappingURL=multi-chat-content.zod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multi-chat-content.zod.d.ts","sourceRoot":"","sources":["../../src/zod/multi-chat-content.zod.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;IAEI;AACJ,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGjC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Generated by ts-to-zod
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { imageContentSchema } from './image-content.zod.js';
|
|
4
|
+
import { textContentSchema } from './text-content.zod.js';
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
**/
|
|
8
|
+
export const multiChatContentSchema = z.union([
|
|
9
|
+
imageContentSchema,
|
|
10
|
+
textContentSchema
|
|
11
|
+
]);
|
|
12
|
+
//# sourceMappingURL=multi-chat-content.zod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multi-chat-content.zod.js","sourceRoot":"","sources":["../../src/zod/multi-chat-content.zod.ts"],"names":[],"mappings":"AAAA,yBAAyB;AACzB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D;;IAEI;AACJ,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC;IAC5C,kBAAkB;IAClB,iBAAiB;CAClB,CAAC,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
**/
|
|
5
|
+
export declare const multiChatTemplateSchema: z.ZodObject<{
|
|
6
|
+
role: z.ZodString;
|
|
7
|
+
content: z.ZodArray<z.ZodUnion<[z.ZodIntersection<z.ZodObject<{
|
|
8
|
+
type: z.ZodLiteral<"image_url">;
|
|
9
|
+
image_url: z.ZodObject<{
|
|
10
|
+
url: z.ZodString;
|
|
11
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
url: string;
|
|
14
|
+
detail?: string | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
url: string;
|
|
17
|
+
detail?: string | undefined;
|
|
18
|
+
}>;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
image_url: {
|
|
21
|
+
url: string;
|
|
22
|
+
detail?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
type: "image_url";
|
|
25
|
+
}, {
|
|
26
|
+
image_url: {
|
|
27
|
+
url: string;
|
|
28
|
+
detail?: string | undefined;
|
|
29
|
+
};
|
|
30
|
+
type: "image_url";
|
|
31
|
+
}>, z.ZodRecord<z.ZodString, z.ZodAny>>, z.ZodObject<{
|
|
32
|
+
type: z.ZodLiteral<"text">;
|
|
33
|
+
text: z.ZodString;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
text: string;
|
|
36
|
+
type: "text";
|
|
37
|
+
}, {
|
|
38
|
+
text: string;
|
|
39
|
+
type: "text";
|
|
40
|
+
}>]>, "many">;
|
|
41
|
+
}, "strip", z.ZodTypeAny, {
|
|
42
|
+
role: string;
|
|
43
|
+
content: ({
|
|
44
|
+
text: string;
|
|
45
|
+
type: "text";
|
|
46
|
+
} | ({
|
|
47
|
+
image_url: {
|
|
48
|
+
url: string;
|
|
49
|
+
detail?: string | undefined;
|
|
50
|
+
};
|
|
51
|
+
type: "image_url";
|
|
52
|
+
} & Record<string, any>))[];
|
|
53
|
+
}, {
|
|
54
|
+
role: string;
|
|
55
|
+
content: ({
|
|
56
|
+
text: string;
|
|
57
|
+
type: "text";
|
|
58
|
+
} | ({
|
|
59
|
+
image_url: {
|
|
60
|
+
url: string;
|
|
61
|
+
detail?: string | undefined;
|
|
62
|
+
};
|
|
63
|
+
type: "image_url";
|
|
64
|
+
} & Record<string, any>))[];
|
|
65
|
+
}>;
|
|
66
|
+
//# sourceMappingURL=multi-chat-template.zod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multi-chat-template.zod.d.ts","sourceRoot":"","sources":["../../src/zod/multi-chat-template.zod.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;IAEI;AACJ,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGlC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Generated by ts-to-zod
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { multiChatContentSchema } from './multi-chat-content.zod.js';
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
**/
|
|
7
|
+
export const multiChatTemplateSchema = z.object({
|
|
8
|
+
role: z.string(),
|
|
9
|
+
content: z.array(multiChatContentSchema)
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=multi-chat-template.zod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multi-chat-template.zod.js","sourceRoot":"","sources":["../../src/zod/multi-chat-template.zod.ts"],"names":[],"mappings":"AAAA,yBAAyB;AACzB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE;;IAEI;AACJ,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC;CACzC,CAAC,CAAC"}
|