dbm-graph-api 1.1.18 → 1.1.19
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dbm-graph-api",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.19",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@aws-sdk/client-s3": "^3.741.0",
|
|
15
15
|
"@aws-sdk/s3-request-presigner": "^3.741.0",
|
|
16
|
-
"dbm": "^1.1.
|
|
16
|
+
"dbm": "^1.1.14",
|
|
17
17
|
"mime": "^4.0.6",
|
|
18
18
|
"sharp": "^0.33.5",
|
|
19
19
|
"ws": "^8.18.0"
|
|
@@ -27,7 +27,7 @@ export default class HelpSectionSuggestions extends Dbm.core.BaseObject {
|
|
|
27
27
|
|
|
28
28
|
let contentString = JSON.stringify(content);
|
|
29
29
|
|
|
30
|
-
let instructions = "
|
|
30
|
+
let instructions = "Summarize what this page is about and generate sections for faq of what this page answers. Write the answer in an active tone of voice, call the company we and the user you. {additionalInstructions} Respond with only a json object {summary: string, questions: [{question: string, oneLineAnswer: string, answer: string, readMoreLinkText: string}]}, no markdown.";
|
|
31
31
|
instructions = instructions.split("{data}").join(contentString);
|
|
32
32
|
|
|
33
33
|
let additionalInstructions = "";
|
|
@@ -13,8 +13,18 @@ export default class HelpSection extends EncodeBaseObject {
|
|
|
13
13
|
let object = Dbm.getInstance().repository.getItem("graphDatabase").controller.getObject(aId);
|
|
14
14
|
|
|
15
15
|
let fields = await object.getFields();
|
|
16
|
+
returnObject["question"] = fields["question"] !== null ? fields["question"] : null;
|
|
16
17
|
returnObject["title"] = fields["title"] !== null ? fields["title"] : null;
|
|
17
18
|
returnObject["link"] = fields["link"] !== null ? fields["link"] : null;
|
|
19
|
+
returnObject["content"] = fields["content"] !== null ? fields["content"] : null;
|
|
20
|
+
returnObject["linkText"] = fields["linkText"] !== null ? fields["linkText"] : null;
|
|
21
|
+
|
|
22
|
+
{
|
|
23
|
+
let relatedItem = await object.singleObjectRelationQuery("out:for:page");
|
|
24
|
+
|
|
25
|
+
returnObject["page"] = await aEncodingSession.encodeObjectOrNull(relatedItem, "url");
|
|
26
|
+
await aEncodingSession.encodeObjectOrNull(relatedItem, "title");
|
|
27
|
+
}
|
|
18
28
|
|
|
19
29
|
return returnObject;
|
|
20
30
|
}
|