contentoh-components-library 21.5.68 → 21.5.69
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/dist/ai/schemas/attribute.schema.js +35 -0
- package/dist/ai/schemas/description.schema.js +27 -0
- package/dist/contexts/AiProductEdition.js +2 -2
- package/package.json +1 -1
- package/src/ai/schemas/attribute.schema.js +23 -0
- package/src/ai/schemas/description.schema.js +19 -0
- package/src/contexts/AiProductEdition.jsx +2 -2
- package/src/ai/schemas/attribute.schema.json +0 -21
- package/src/ai/schemas/description.schema.json +0 -17
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var schema = {
|
|
8
|
+
type: "object",
|
|
9
|
+
properties: {
|
|
10
|
+
results: {
|
|
11
|
+
type: "array",
|
|
12
|
+
items: {
|
|
13
|
+
type: "object",
|
|
14
|
+
properties: {
|
|
15
|
+
label: {
|
|
16
|
+
type: "string"
|
|
17
|
+
},
|
|
18
|
+
value: {
|
|
19
|
+
type: "string"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
maxItems: 3
|
|
24
|
+
},
|
|
25
|
+
compliance_warnings: {
|
|
26
|
+
type: "array",
|
|
27
|
+
items: {
|
|
28
|
+
type: "string"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
required: ["results"]
|
|
33
|
+
};
|
|
34
|
+
var _default = schema;
|
|
35
|
+
exports.default = _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var schema = {
|
|
8
|
+
type: "object",
|
|
9
|
+
properties: {
|
|
10
|
+
results: {
|
|
11
|
+
type: "array",
|
|
12
|
+
items: {
|
|
13
|
+
type: "object",
|
|
14
|
+
properties: {
|
|
15
|
+
value: {
|
|
16
|
+
type: "string"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
minItems: 1,
|
|
21
|
+
maxItems: 3
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
required: ["results"]
|
|
25
|
+
};
|
|
26
|
+
var _default = schema;
|
|
27
|
+
exports.default = _default;
|
|
@@ -21,9 +21,9 @@ var _react = require("react");
|
|
|
21
21
|
|
|
22
22
|
var _axios = _interopRequireDefault(require("axios"));
|
|
23
23
|
|
|
24
|
-
var _attributeSchema = _interopRequireDefault(require("../ai/schemas/attribute.schema.
|
|
24
|
+
var _attributeSchema = _interopRequireDefault(require("../ai/schemas/attribute.schema.js"));
|
|
25
25
|
|
|
26
|
-
var _descriptionSchema = _interopRequireDefault(require("../ai/schemas/description.schema.
|
|
26
|
+
var _descriptionSchema = _interopRequireDefault(require("../ai/schemas/description.schema.js"));
|
|
27
27
|
|
|
28
28
|
var _genai = require("@google/genai");
|
|
29
29
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const schema = {
|
|
2
|
+
type: "object",
|
|
3
|
+
properties: {
|
|
4
|
+
results: {
|
|
5
|
+
type: "array",
|
|
6
|
+
items: {
|
|
7
|
+
type: "object",
|
|
8
|
+
properties: {
|
|
9
|
+
label: { type: "string" },
|
|
10
|
+
value: { type: "string" }
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
maxItems: 3
|
|
14
|
+
},
|
|
15
|
+
compliance_warnings: {
|
|
16
|
+
type: "array",
|
|
17
|
+
items: { type: "string" }
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
required: ["results"]
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default schema;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const schema = {
|
|
2
|
+
type: "object",
|
|
3
|
+
properties: {
|
|
4
|
+
results: {
|
|
5
|
+
type: "array",
|
|
6
|
+
items: {
|
|
7
|
+
type: "object",
|
|
8
|
+
properties: {
|
|
9
|
+
value: { type: "string" }
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
minItems: 1,
|
|
13
|
+
maxItems: 3
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
required: ["results"]
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default schema;
|
|
@@ -2,8 +2,8 @@ import { useContext, useEffect, useState } from "react";
|
|
|
2
2
|
import { createContext } from "react";
|
|
3
3
|
import axios from "axios";
|
|
4
4
|
|
|
5
|
-
import AttributeSchema from "../ai/schemas/attribute.schema.
|
|
6
|
-
import DescriptionSchema from "../ai/schemas/description.schema.
|
|
5
|
+
import AttributeSchema from "../ai/schemas/attribute.schema.js";
|
|
6
|
+
import DescriptionSchema from "../ai/schemas/description.schema.js";
|
|
7
7
|
|
|
8
8
|
import { GoogleGenAI } from "@google/genai";
|
|
9
9
|
import { generateDescriptionPrompt } from "../ai/prompts/description.prompt";
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "object",
|
|
3
|
-
"properties": {
|
|
4
|
-
"results": {
|
|
5
|
-
"type": "array",
|
|
6
|
-
"items": {
|
|
7
|
-
"type": "object",
|
|
8
|
-
"properties": {
|
|
9
|
-
"label": { "type": "string" },
|
|
10
|
-
"value": { "type": "string" }
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
"maxItems": 3
|
|
14
|
-
},
|
|
15
|
-
"compliance_warnings": {
|
|
16
|
-
"type": "array",
|
|
17
|
-
"items": { "type": "string" }
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"required": ["results"]
|
|
21
|
-
}
|