@lilaquadrat/studio 10.0.0-beta.5 → 10.0.0-beta.51
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/eslint.config.js +146 -0
- package/lib/fastify-plugins.d.ts +4 -0
- package/lib/fastify-plugins.js +5 -0
- package/lib/fastify-plugins.js.map +1 -0
- package/lib/helpers.d.ts +4 -2
- package/lib/helpers.js +13 -2
- package/lib/helpers.js.map +1 -1
- package/lib/main.d.ts +1 -3
- package/lib/main.js +7 -3
- package/lib/main.js.map +1 -1
- package/lib/models.d.ts +4 -4
- package/lib/models.js +4 -4
- package/lib/models.js.map +1 -1
- package/lib/services.d.ts +5 -8
- package/lib/services.js +27 -9
- package/lib/services.js.map +1 -1
- package/lib/src/Immutable.class.d.ts +8 -1
- package/lib/src/Immutable.class.js +52 -8
- package/lib/src/Immutable.class.js.map +1 -1
- package/lib/src/ShareClientFactory.class.d.ts +1 -3
- package/lib/src/ShareClientFactory.class.js +1 -9
- package/lib/src/ShareClientFactory.class.js.map +1 -1
- package/lib/src/classes/models.class.js.map +1 -1
- package/lib/src/classes/modelv2.class.d.ts +2 -0
- package/lib/src/classes/modelv2.class.js +1 -1
- package/lib/src/classes/modelv2.class.js.map +1 -1
- package/lib/src/classes/mongo.class.js +4 -14
- package/lib/src/classes/mongo.class.js.map +1 -1
- package/lib/src/functions/handleError.d.ts +2 -3
- package/lib/src/functions/handleError.js +3 -16
- package/lib/src/functions/handleError.js.map +1 -1
- package/lib/src/functions/optionsHelper.d.ts +4 -4
- package/lib/src/functions/optionsHelper.js +5 -4
- package/lib/src/functions/optionsHelper.js.map +1 -1
- package/lib/src/functions/respondCode.d.ts +2 -1
- package/lib/src/functions/respondCode.js +1 -1
- package/lib/src/functions/respondCode.js.map +1 -1
- package/lib/src/helpers/ControllerHelper.d.ts +73 -0
- package/lib/src/helpers/ControllerHelper.js +242 -0
- package/lib/src/helpers/ControllerHelper.js.map +1 -0
- package/lib/src/helpers/EnvMapper.d.ts +0 -0
- package/lib/src/helpers/EnvMapper.js +1 -0
- package/lib/src/helpers/EnvMapper.js.map +1 -0
- package/lib/src/helpers/auth0config.d.ts +6 -0
- package/lib/src/helpers/auth0config.js +23 -0
- package/lib/src/helpers/auth0config.js.map +1 -0
- package/lib/src/helpers/authPlugin.d.ts +29 -0
- package/lib/src/helpers/authPlugin.js +77 -0
- package/lib/src/helpers/authPlugin.js.map +1 -0
- package/lib/src/helpers/cacheHelper.d.ts +69 -0
- package/lib/src/helpers/cacheHelper.js +235 -0
- package/lib/src/helpers/cacheHelper.js.map +1 -0
- package/lib/src/helpers/createSasToken.d.ts +0 -2
- package/lib/src/helpers/createSasToken.js +35 -32
- package/lib/src/helpers/createSasToken.js.map +1 -1
- package/lib/src/helpers/getSecrets.d.ts +1 -1
- package/lib/src/helpers/getSecrets.js +10 -12
- package/lib/src/helpers/getSecrets.js.map +1 -1
- package/lib/src/helpers/queryAssertionPlugin.d.ts +3 -0
- package/lib/src/helpers/queryAssertionPlugin.js +20 -0
- package/lib/src/helpers/queryAssertionPlugin.js.map +1 -0
- package/lib/src/helpers/safeObjectId.d.ts +1 -1
- package/lib/src/helpers/safeObjectId.js +5 -1
- package/lib/src/helpers/safeObjectId.js.map +1 -1
- package/lib/src/helpers/storageSdkFactory.d.ts +2 -0
- package/lib/src/helpers/storageSdkFactory.js +11 -0
- package/lib/src/helpers/storageSdkFactory.js.map +1 -0
- package/lib/src/helpers/studioAppPlugin.d.ts +3 -0
- package/lib/src/helpers/studioAppPlugin.js +16 -0
- package/lib/src/helpers/studioAppPlugin.js.map +1 -0
- package/lib/src/logger.js +154 -32
- package/lib/src/logger.js.map +1 -1
- package/lib/src/models/customers.model.js +14 -4
- package/lib/src/models/customers.model.js.map +1 -1
- package/lib/src/models/design.model.d.ts +4 -0
- package/lib/src/models/design.model.js +58 -0
- package/lib/src/models/design.model.js.map +1 -0
- package/lib/src/models/domain.model.js +1 -1
- package/lib/src/models/domain.model.js.map +1 -1
- package/lib/src/models/editor.model.js +7 -0
- package/lib/src/models/editor.model.js.map +1 -1
- package/lib/src/models/emailLimit.model.d.ts +4 -0
- package/lib/src/models/emailLimit.model.js +31 -0
- package/lib/src/models/emailLimit.model.js.map +1 -0
- package/lib/src/models/hosting.model.js +1 -3
- package/lib/src/models/hosting.model.js.map +1 -1
- package/lib/src/models/hostingSettings.model.js +6 -4
- package/lib/src/models/hostingSettings.model.js.map +1 -1
- package/lib/src/models/invoice.model.d.ts +4 -0
- package/lib/src/models/invoice.model.js +235 -0
- package/lib/src/models/invoice.model.js.map +1 -0
- package/lib/src/models/mailFrom.model.js +53 -10
- package/lib/src/models/mailFrom.model.js.map +1 -1
- package/lib/src/models/project.model.js +2 -4
- package/lib/src/models/project.model.js.map +1 -1
- package/lib/src/models/publish-method.model.js +79 -430
- package/lib/src/models/publish-method.model.js.map +1 -1
- package/lib/src/models/storage.model.js +11 -3
- package/lib/src/models/storage.model.js.map +1 -1
- package/lib/src/prompts/textGeneration.js +88 -0
- package/lib/src/prompts/textGeneration.js.map +1 -1
- package/lib/src/prompts/textGenerationMulti.js +78 -44
- package/lib/src/prompts/textGenerationMulti.js.map +1 -1
- package/lib/src/services/access.service.d.ts +0 -37
- package/lib/src/services/access.service.js +119 -108
- package/lib/src/services/access.service.js.map +1 -1
- package/lib/src/services/ai.service.d.ts +4 -3
- package/lib/src/services/ai.service.js +22 -29
- package/lib/src/services/ai.service.js.map +1 -1
- package/lib/src/services/auth.service.d.ts +10 -0
- package/lib/src/services/auth.service.js +63 -0
- package/lib/src/services/auth.service.js.map +1 -0
- package/lib/src/services/conf.service.d.ts +3 -31
- package/lib/src/services/conf.service.js +58 -167
- package/lib/src/services/conf.service.js.map +1 -1
- package/lib/src/services/customers.service.d.ts +8 -4
- package/lib/src/services/customers.service.js +34 -7
- package/lib/src/services/customers.service.js.map +1 -1
- package/lib/src/services/designs.service.d.ts +7 -0
- package/lib/src/services/designs.service.js +10 -0
- package/lib/src/services/designs.service.js.map +1 -0
- package/lib/src/services/domains.service.d.ts +18 -91
- package/lib/src/services/domains.service.js +91 -559
- package/lib/src/services/domains.service.js.map +1 -1
- package/lib/src/services/editor.service.d.ts +4 -0
- package/lib/src/services/editor.service.js +28 -0
- package/lib/src/services/editor.service.js.map +1 -1
- package/lib/src/services/emailLimit.service.d.ts +21 -0
- package/lib/src/services/emailLimit.service.js +51 -0
- package/lib/src/services/emailLimit.service.js.map +1 -0
- package/lib/src/services/hosting.service.d.ts +12 -24
- package/lib/src/services/hosting.service.js +32 -122
- package/lib/src/services/hosting.service.js.map +1 -1
- package/lib/src/services/hostingAdmin.service.d.ts +1 -1
- package/lib/src/services/hostingAdmin.service.js +2 -2
- package/lib/src/services/hostingAdmin.service.js.map +1 -1
- package/lib/src/services/import.service.d.ts +6 -22
- package/lib/src/services/import.service.js +63 -65
- package/lib/src/services/import.service.js.map +1 -1
- package/lib/src/services/invoices.service.d.ts +30 -0
- package/lib/src/services/invoices.service.js +265 -0
- package/lib/src/services/invoices.service.js.map +1 -0
- package/lib/src/services/jetstream.service.d.ts +5 -3
- package/lib/src/services/jetstream.service.js +63 -7
- package/lib/src/services/jetstream.service.js.map +1 -1
- package/lib/src/services/listParticipants.service.d.ts +2 -5
- package/lib/src/services/listParticipants.service.js +17 -14
- package/lib/src/services/listParticipants.service.js.map +1 -1
- package/lib/src/services/mailFrom.service.d.ts +14 -1
- package/lib/src/services/mailFrom.service.js +55 -0
- package/lib/src/services/mailFrom.service.js.map +1 -1
- package/lib/src/services/me.service.d.ts +22 -12
- package/lib/src/services/me.service.js +58 -89
- package/lib/src/services/me.service.js.map +1 -1
- package/lib/src/services/publish.service.d.ts +3 -7
- package/lib/src/services/publish.service.js +32 -32
- package/lib/src/services/publish.service.js.map +1 -1
- package/lib/src/services/publishData.service.d.ts +10 -7
- package/lib/src/services/publishData.service.js +32 -75
- package/lib/src/services/publishData.service.js.map +1 -1
- package/lib/src/services/spamAnalasys.service.d.ts +4 -4
- package/lib/src/services/spamAnalasys.service.js +36 -44
- package/lib/src/services/spamAnalasys.service.js.map +1 -1
- package/lib/src/services/storage.service.d.ts +22 -29
- package/lib/src/services/storage.service.js +123 -57
- package/lib/src/services/storage.service.js.map +1 -1
- package/lib/src/services/structures.service.d.ts +1 -1
- package/lib/src/services/upload.service.js +6 -1
- package/lib/src/services/upload.service.js.map +1 -1
- package/package.json +28 -29
- package/lib/src/AzureBlobStorage.share.d.ts +0 -19
- package/lib/src/AzureBlobStorage.share.js +0 -162
- package/lib/src/AzureBlobStorage.share.js.map +0 -1
- package/lib/src/AzureFileStorage.share.d.ts +0 -22
- package/lib/src/AzureFileStorage.share.js +0 -139
- package/lib/src/AzureFileStorage.share.js.map +0 -1
- package/lib/src/AzureVault.d.ts +0 -14
- package/lib/src/AzureVault.js +0 -28
- package/lib/src/AzureVault.js.map +0 -1
- package/lib/src/dns.challenge.class.d.ts +0 -17
- package/lib/src/dns.challenge.class.js +0 -41
- package/lib/src/dns.challenge.class.js.map +0 -1
- package/lib/src/http.challenge.class.d.ts +0 -33
- package/lib/src/http.challenge.class.js +0 -58
- package/lib/src/http.challenge.class.js.map +0 -1
- package/lib/src/models/certificate-action.model.d.ts +0 -5
- package/lib/src/models/certificate-action.model.js +0 -230
- package/lib/src/models/certificate-action.model.js.map +0 -1
- package/lib/src/models/certificate.model.d.ts +0 -4
- package/lib/src/models/certificate.model.js +0 -96
- package/lib/src/models/certificate.model.js.map +0 -1
- package/lib/src/models/editorBase.model.d.ts +0 -4
- package/lib/src/models/editorBase.model.js +0 -39
- package/lib/src/models/editorBase.model.js.map +0 -1
- package/lib/src/services/certificates.service.d.ts +0 -56
- package/lib/src/services/certificates.service.js +0 -169
- package/lib/src/services/certificates.service.js.map +0 -1
- package/lib/src/services/certificatesAction.service.d.ts +0 -41
- package/lib/src/services/certificatesAction.service.js +0 -188
- package/lib/src/services/certificatesAction.service.js.map +0 -1
- package/lib/src/services/editorBase.service.d.ts +0 -46
- package/lib/src/services/editorBase.service.js +0 -161
- package/lib/src/services/editorBase.service.js.map +0 -1
- package/lib/src/services/handleFile.service.d.ts +0 -9
- package/lib/src/services/handleFile.service.js +0 -45
- package/lib/src/services/handleFile.service.js.map +0 -1
- package/lib/src/services/media.service.d.ts +0 -35
- package/lib/src/services/media.service.js +0 -418
- package/lib/src/services/media.service.js.map +0 -1
- package/lib/src/services/share.service.d.ts +0 -6
- package/lib/src/services/share.service.js +0 -4
- package/lib/src/services/share.service.js.map +0 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
1
2
|
export default function textGeneration(input, element, context) {
|
|
2
3
|
const inputKeyExplanations = {
|
|
3
4
|
headline: 'headline: main title. will be ## in the context',
|
|
@@ -5,6 +6,92 @@ export default function textGeneration(input, element, context) {
|
|
|
5
6
|
intro: 'intro: introductory text will be #### in the context',
|
|
6
7
|
text: 'text: array of paragraphs',
|
|
7
8
|
};
|
|
9
|
+
return `You are an AI text generation assistant integrated with an enterprise CMS. Your primary goal is to generate text for a single page ("site") of a website using structured JSON input, exact contextual fields, and—most crucially—strict adherence to the provided "instructions." All your outputs and processing must be governed first and foremost by the "instructions" field, with contextual influences applied only as permitted or guided by those instructions.
|
|
10
|
+
|
|
11
|
+
Use the input JSON provided to you, which has the following structure:
|
|
12
|
+
|
|
13
|
+
{
|
|
14
|
+
"input": "${input}"
|
|
15
|
+
"context": {
|
|
16
|
+
"demographic": "Target audience for the page",
|
|
17
|
+
"tone": "Desired tone (e.g., friendly, professional)",
|
|
18
|
+
"project": "Description of the overall project",
|
|
19
|
+
"site": "Information about the current site/page",
|
|
20
|
+
"parent": "Context of the parent page, if any",
|
|
21
|
+
"siblings": "Context from sibling elements/pages",
|
|
22
|
+
"direct": "Direct context for current content/module",
|
|
23
|
+
"environment": "Description of the display environment and usage",
|
|
24
|
+
"content": "Markdown content for the site"
|
|
25
|
+
},
|
|
26
|
+
"instructions": "Any specific instructions for generating or shaping the text"
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
the input is a ${inputKeyExplanations[element]}
|
|
30
|
+
|
|
31
|
+
# Detailed Task
|
|
32
|
+
|
|
33
|
+
- The "instructions" field is the absolute authority for shaping, directing, and constraining all generated content. You must follow it exactly; override context or default approaches if the instructions require it.
|
|
34
|
+
- Use the "context" fields to inform additional writing details, applying the following weighted influences (higher means more important), but only as permitted by the instructions:
|
|
35
|
+
- project: 0.4
|
|
36
|
+
- site: 0.48
|
|
37
|
+
- parent: 0.48
|
|
38
|
+
- siblings: 0.64
|
|
39
|
+
- direct: 0.8
|
|
40
|
+
- environment: 0.8
|
|
41
|
+
- content: 0.32
|
|
42
|
+
- demographic: 0.6
|
|
43
|
+
- tone: 0.6
|
|
44
|
+
- Every key in the "input" object must receive a unique, relevant value (do not duplicate content across fields), and the text should only reflect the context to the extent allowed by the instructions.
|
|
45
|
+
- Your output **must** precisely match the input JSON structure, with no additional keys, extra fields, or markup. Produce only the required JSON.
|
|
46
|
+
- Never ask questions, seek clarification, or provide explanations. Only generate and output content as directed by instructions.
|
|
47
|
+
- No markup (Markdown, HTML, or formatting syntax) is allowed in outputs—plain text only.
|
|
48
|
+
- Persist in internally verifying compliance with the instructions above all else before writing your final JSON response.
|
|
49
|
+
|
|
50
|
+
# Steps
|
|
51
|
+
|
|
52
|
+
1. Thoroughly read and analyze the "instructions" field; determine any required structure, style, ordering, or output format mandates.
|
|
53
|
+
2. Reread each context field and apply only those elements which the instructions specify, or where not otherwise constrained, weigh them according to the context weights above.
|
|
54
|
+
3. For each "input" key (including "intro" and every "text" string), carefully plan and compose content that fully implements the instructions, referencing additional context as allowed.
|
|
55
|
+
4. Confirm no duplication between any "input" keys. All outputs must be non-redundant and unique.
|
|
56
|
+
5. Internally review your response for absolute adherence to the instructions, overriding context weightings or defaults if needed.
|
|
57
|
+
6. Output only the updated JSON with your generated field values.
|
|
58
|
+
|
|
59
|
+
# Output Format
|
|
60
|
+
|
|
61
|
+
Output must be the completed JSON object, strictly matching the input in structure and property names. Do not add, remove, or reorder fields. No extra text, commentary, explanations, or markup of any kind should ever be output. Plain text values only.
|
|
62
|
+
|
|
63
|
+
# Example
|
|
64
|
+
|
|
65
|
+
**Input (for context, this will be sent to you):**
|
|
66
|
+
{
|
|
67
|
+
"input": "${input}"
|
|
68
|
+
"context": {
|
|
69
|
+
"demographic": "University students",
|
|
70
|
+
"tone": "Enthusiastic and clear",
|
|
71
|
+
"project": "An educational resources portal for biology students",
|
|
72
|
+
"site": "Homepage for the biology resources section",
|
|
73
|
+
"parent": "Main portal landing page",
|
|
74
|
+
"siblings": "Mathematics and chemistry resource pages",
|
|
75
|
+
"direct": "Highlighting latest biology tutorials and guides",
|
|
76
|
+
"environment": "Displayed in a mobile-friendly web app",
|
|
77
|
+
"content": "Collection of resources, articles, and video guides"
|
|
78
|
+
},
|
|
79
|
+
"instructions": "Explain the section's purpose in the intro, then provide two distinct welcoming paragraphs that introduce resources and encourage navigation."
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
**Expected Output:**
|
|
83
|
+
{
|
|
84
|
+
"input": "${input}"
|
|
85
|
+
}
|
|
86
|
+
*(Actual outputs should match in length, substance, and adherence to the instructions; always ensure they follow the specific guidance provided.)*
|
|
87
|
+
|
|
88
|
+
# Notes
|
|
89
|
+
|
|
90
|
+
- The "instructions" field must govern and take precedence in all cases. Never ignore, sideline, or deprioritize details within "instructions"; always double-check that outputs meet them fully.
|
|
91
|
+
- All text must be unique, plain text, and adhere precisely to the instructions and output format constraints.
|
|
92
|
+
- Never explain, comment, or output context or process steps—output only the specified JSON fields and values.
|
|
93
|
+
|
|
94
|
+
**Reminder: Strictly follow the "instructions" for content, style, and scope. Output only the structured JSON—no extra text, explanations, or markup.**`;
|
|
8
95
|
return `you are an text assistant. you are part of a enterprise cms. you are creating text for a single site of a website.
|
|
9
96
|
|
|
10
97
|
i will provide an json in this format:
|
|
@@ -53,6 +140,7 @@ the weights for the context are like this:
|
|
|
53
140
|
RULE: you use the instructions and the context to produce new text like the instructions say.
|
|
54
141
|
RULE: the weighted context has to be used to produce the text and
|
|
55
142
|
RULE: output has to match the input json, no additional keys allowed
|
|
143
|
+
RULE: only output the input json, no context or anything else
|
|
56
144
|
RULE: dont even ask for something. just produce some ouput
|
|
57
145
|
RULE: only human readable text, no code, no json, no html, no markdown
|
|
58
146
|
RULE: dont ever use new lines in the output, just use a single line of text
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textGeneration.js","sourceRoot":"","sources":["../../../src/prompts/textGeneration.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAU,EAAE,OAAe,EAAE,OAAY;IAE9E,MAAM,oBAAoB,GAA2B;QACnD,QAAQ,EAAE,iDAAiD;QAC3D,OAAO,EAAE,mEAAmE;QAC5E,KAAK,EAAE,sDAAsD;QAC7D,IAAI,EAAE,2BAA2B;KAClC,CAAC;IAEF,OAAO;;;;gBAIO,KAAK;;;;;;;;;;;;;;;iBAeJ,oBAAoB,CAAC,OAAO,CAAC
|
|
1
|
+
{"version":3,"file":"textGeneration.js","sourceRoot":"","sources":["../../../src/prompts/textGeneration.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAU,EAAE,OAAe,EAAE,OAAY;IAE9E,MAAM,oBAAoB,GAA2B;QACnD,QAAQ,EAAE,iDAAiD;QAC3D,OAAO,EAAE,mEAAmE;QAC5E,KAAK,EAAE,sDAAsD;QAC7D,IAAI,EAAE,2BAA2B;KAClC,CAAC;IAEF,OAAO;;;;;cAKK,KAAK;;;;;;;;;;;;;;;iBAeF,oBAAoB,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAsChC,KAAK;;;;;;;;;;;;;;;;;cAiBL,KAAK;;;;;;;;;;wJAUqI,CAAA;IAEtJ,OAAO;;;;gBAIO,KAAK;;;;;;;;;;;;;;;iBAeJ,oBAAoB,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiC7C,CAAC;AAEF,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
1
2
|
export default function textGenerationMulti(input, context) {
|
|
2
3
|
const inputKeyExplanations = {
|
|
3
4
|
headline: 'headline: main title. will be ## in the context',
|
|
@@ -9,56 +10,89 @@ export default function textGenerationMulti(input, context) {
|
|
|
9
10
|
.filter(key => inputKeyExplanations[key])
|
|
10
11
|
.map(key => ` ${inputKeyExplanations[key]}`)
|
|
11
12
|
.join('\n');
|
|
12
|
-
return `
|
|
13
|
+
return `You are an AI text generation assistant integrated with an enterprise CMS. Your primary goal is to generate text for a single page ("site") of a website using structured JSON input, exact contextual fields, and—most crucially—strict adherence to the provided "instructions." All your outputs and processing must be governed first and foremost by the "instructions" field, with contextual influences applied only as permitted or guided by those instructions.
|
|
14
|
+
|
|
15
|
+
Use the input JSON provided to you, which has the following structure:
|
|
13
16
|
|
|
14
|
-
i will provide an json in this format:
|
|
15
17
|
{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
"input": ${JSON.stringify(input, null, 2)},
|
|
19
|
+
"context": {
|
|
20
|
+
"demographic": "Target audience for the page",
|
|
21
|
+
"tone": "Desired tone (e.g., friendly, professional)",
|
|
22
|
+
"project": "Description of the overall project",
|
|
23
|
+
"site": "Information about the current site/page",
|
|
24
|
+
"parent": "Context of the parent page, if any",
|
|
25
|
+
"siblings": "Context from sibling elements/pages",
|
|
26
|
+
"direct": "Direct context for current content/module",
|
|
27
|
+
"environment": "Description of the display environment and usage",
|
|
28
|
+
"content": "Markdown content for the site"
|
|
29
|
+
},
|
|
30
|
+
"instructions": "Any specific instructions for generating or shaping the text"
|
|
28
31
|
}
|
|
29
32
|
|
|
30
|
-
${explanations ? `Explanation of input keys:\n${explanations}\n\n` : ''}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
${explanations ? `Explanation of input keys:\n${explanations}\n\n` : ''}# Detailed Task
|
|
34
|
+
|
|
35
|
+
- The "instructions" field is the absolute authority for shaping, directing, and constraining all generated content. You must follow it exactly; override context or default approaches if the instructions require it.
|
|
36
|
+
- Use the "context" fields to inform additional writing details, applying the following weighted influences (higher means more important), but only as permitted by the instructions:
|
|
37
|
+
- project: 0.4
|
|
38
|
+
- site: 0.48
|
|
39
|
+
- parent: 0.48
|
|
40
|
+
- siblings: 0.64
|
|
41
|
+
- direct: 0.8
|
|
42
|
+
- environment: 0.8
|
|
43
|
+
- content: 0.32
|
|
44
|
+
- demographic: 0.6
|
|
45
|
+
- tone: 0.6
|
|
46
|
+
- Every key in the "input" object must receive a unique, relevant value (do not duplicate content across fields), and the text should only reflect the context to the extent allowed by the instructions.
|
|
47
|
+
- Your output **must** precisely match the input JSON structure, with no additional keys, extra fields, or markup. Produce only the required JSON.
|
|
48
|
+
- Never ask questions, seek clarification, or provide explanations. Only generate and output content as directed by instructions.
|
|
49
|
+
- No markup (Markdown, HTML, or formatting syntax) is allowed in outputs—plain text only.
|
|
50
|
+
- Persist in internally verifying compliance with the instructions above all else before writing your final JSON response.
|
|
51
|
+
|
|
52
|
+
# Steps
|
|
53
|
+
|
|
54
|
+
1. Thoroughly read and analyze the "instructions" field; determine any required structure, style, ordering, or output format mandates.
|
|
55
|
+
2. Reread each context field and apply only those elements which the instructions specify, or where not otherwise constrained, weigh them according to the context weights above.
|
|
56
|
+
3. For each "input" key (including "intro" and every "text" string), carefully plan and compose content that fully implements the instructions, referencing additional context as allowed.
|
|
57
|
+
4. Confirm no duplication between any "input" keys. All outputs must be non-redundant and unique.
|
|
58
|
+
5. Internally review your response for absolute adherence to the instructions, overriding context weightings or defaults if needed.
|
|
59
|
+
6. Output only the updated JSON with your generated field values.
|
|
60
|
+
|
|
61
|
+
# Output Format
|
|
62
|
+
|
|
63
|
+
Output must be the completed JSON object, strictly matching the input in structure and property names. Do not add, remove, or reorder fields. No extra text, commentary, explanations, or markup of any kind should ever be output. Plain text values only.
|
|
64
|
+
|
|
65
|
+
# Example
|
|
66
|
+
|
|
67
|
+
**Input (for context, this will be sent to you):**
|
|
68
|
+
{
|
|
69
|
+
"input": ${JSON.stringify(input, null, 2)},
|
|
70
|
+
"context": {
|
|
71
|
+
"demographic": "University students",
|
|
72
|
+
"tone": "Enthusiastic and clear",
|
|
73
|
+
"project": "An educational resources portal for biology students",
|
|
74
|
+
"site": "Homepage for the biology resources section",
|
|
75
|
+
"parent": "Main portal landing page",
|
|
76
|
+
"siblings": "Mathematics and chemistry resource pages",
|
|
77
|
+
"direct": "Highlighting latest biology tutorials and guides",
|
|
78
|
+
"environment": "Displayed in a mobile-friendly web app",
|
|
79
|
+
"content": "Collection of resources, articles, and video guides"
|
|
80
|
+
},
|
|
81
|
+
"instructions": "Explain the section's purpose in the intro, then provide two distinct welcoming paragraphs that introduce resources and encourage navigation."
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
**Expected Output:**
|
|
85
|
+
{
|
|
86
|
+
"input": ${JSON.stringify(input, null, 2)}
|
|
87
|
+
}
|
|
88
|
+
*(Actual outputs should match in length, substance, and adherence to the instructions; always ensure they follow the specific guidance provided.)*
|
|
40
89
|
|
|
41
|
-
|
|
42
|
-
demographic and tone are provided by the user to help you understand the target audience and tone of the text.
|
|
90
|
+
# Notes
|
|
43
91
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
parent: 0.48
|
|
48
|
-
siblings: 0.64
|
|
49
|
-
direct: 0.8
|
|
50
|
-
content: 0.32
|
|
51
|
-
demographic: 0.6
|
|
52
|
-
environment: 0.8
|
|
53
|
-
tone: 0.6
|
|
92
|
+
- The "instructions" field must govern and take precedence in all cases. Never ignore, sideline, or deprioritize details within "instructions"; always double-check that outputs meet them fully.
|
|
93
|
+
- All text must be unique, plain text, and adhere precisely to the instructions and output format constraints.
|
|
94
|
+
- Never explain, comment, or output context or process steps—output only the specified JSON fields and values.
|
|
54
95
|
|
|
55
|
-
|
|
56
|
-
RULE: every key in the input json has to be affected
|
|
57
|
-
RULE: each key has to have unique text, no duplicates
|
|
58
|
-
RULE: the weighted context has to be used to produce the text and
|
|
59
|
-
RULE: output has to match the input json, no additional keys allowed
|
|
60
|
-
RULE: dont even ask for something. just produce some ouput
|
|
61
|
-
RULE: only text outputs, no markup of any kind
|
|
62
|
-
`;
|
|
96
|
+
**Reminder: Strictly follow the "instructions" for content, style, and scope. Output only the structured JSON—no extra text, explanations, or markup.**`;
|
|
63
97
|
}
|
|
64
98
|
//# sourceMappingURL=textGenerationMulti.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textGenerationMulti.js","sourceRoot":"","sources":["../../../src/prompts/textGenerationMulti.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAU,EAAE,OAAY;IAElE,MAAM,oBAAoB,GAA2B;QACnD,QAAQ,EAAE,iDAAiD;QAC3D,OAAO,EAAE,mEAAmE;QAC5E,KAAK,EAAE,sDAAsD;QAC7D,IAAI,EAAE,2BAA2B;KAClC,CAAC;IAEF,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;SACpC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC;SACxC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,oBAAoB,CAAC,GAAG,CAAC,EAAE,CAAC;SAC9C,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,OAAO
|
|
1
|
+
{"version":3,"file":"textGenerationMulti.js","sourceRoot":"","sources":["../../../src/prompts/textGenerationMulti.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAU,EAAE,OAAY;IAElE,MAAM,oBAAoB,GAA2B;QACnD,QAAQ,EAAE,iDAAiD;QAC3D,OAAO,EAAE,mEAAmE;QAC5E,KAAK,EAAE,sDAAsD;QAC7D,IAAI,EAAE,2BAA2B;KAClC,CAAC;IAEF,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;SACpC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC;SACxC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,oBAAoB,CAAC,GAAG,CAAC,EAAE,CAAC;SAC9C,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,OAAO;;;;;aAKI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;;;;;;;;;;;;;;;EAezC,YAAY,CAAC,CAAC,CAAC,+BAA+B,YAAY,MAAM,CAAC,CAAC,CAAC,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAoC1D,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;;;;;;;;;;;;;;;;;aAiB9B,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;;;;;;;;;;wJAU6G,CAAC;AAEzJ,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import Timeseries from '../Timeseries.class.js';
|
|
2
|
-
import { NextFunction, Request, Response } from 'express';
|
|
3
|
-
import { Access } from '@lilaquadrat/interfaces';
|
|
4
|
-
type AccessSettings = {
|
|
5
|
-
callLimits: {
|
|
6
|
-
second: number;
|
|
7
|
-
minute: number;
|
|
8
|
-
quarter: number;
|
|
9
|
-
hour: number;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export default class AccessService extends Timeseries<Access> {
|
|
13
|
-
model: import("../classes/TimeseriesModel.class.js").default<Access>;
|
|
14
|
-
settings: AccessSettings;
|
|
15
|
-
constructor(settings: AccessSettings);
|
|
16
|
-
count(after: Date): Promise<number>;
|
|
17
|
-
lastHour(ipOrUser: string, options?: {
|
|
18
|
-
user: boolean;
|
|
19
|
-
}): Promise<AccessSettings['callLimits'] | undefined>;
|
|
20
|
-
/**
|
|
21
|
-
applies the provided settings that limit the requests per second, minute, 15 minutes and hour.
|
|
22
|
-
responds with code 429 if the limits are exceeded
|
|
23
|
-
```TS
|
|
24
|
-
callLimits: {
|
|
25
|
-
second: number,
|
|
26
|
-
minute: number,
|
|
27
|
-
quarter: number
|
|
28
|
-
hour: number
|
|
29
|
-
}
|
|
30
|
-
```
|
|
31
|
-
*/
|
|
32
|
-
applyLimits(req: Request, res: Response, next: NextFunction, options?: {
|
|
33
|
-
user: boolean;
|
|
34
|
-
}): Promise<boolean>;
|
|
35
|
-
sendResponse(limit: string, interval: string, res: Response): void;
|
|
36
|
-
}
|
|
37
|
-
export {};
|
|
@@ -1,109 +1,120 @@
|
|
|
1
|
-
import dayjs from 'dayjs';
|
|
2
|
-
import Timeseries from '../Timeseries.class.js';
|
|
3
|
-
import AccessModel from '../models/access.model.js';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
1
|
+
// import dayjs from 'dayjs';
|
|
2
|
+
// import Timeseries from '../Timeseries.class.js';
|
|
3
|
+
// import AccessModel from '../models/access.model.js';
|
|
4
|
+
// import { NextFunction, Request, Response } from 'express';
|
|
5
|
+
// import { Access } from '@lilaquadrat/interfaces';
|
|
6
|
+
// import { HttpStatusCode } from '../helpers/HttpStatusCode.enum.js';
|
|
7
|
+
// type AccessSettings = {
|
|
8
|
+
// callLimits: {
|
|
9
|
+
// second: number,
|
|
10
|
+
// minute: number,
|
|
11
|
+
// quarter: number
|
|
12
|
+
// hour: number
|
|
13
|
+
// }
|
|
14
|
+
// };
|
|
15
|
+
// export default class AccessService extends Timeseries<Access> {
|
|
16
|
+
// model = AccessModel;
|
|
17
|
+
// settings: AccessSettings;
|
|
18
|
+
// constructor(settings: AccessSettings) {
|
|
19
|
+
// super();
|
|
20
|
+
// this.settings = settings;
|
|
21
|
+
// }
|
|
22
|
+
// count(after: Date) {
|
|
23
|
+
// return this.model.db.countDocuments({ date: { $gte: after } });
|
|
24
|
+
// }
|
|
25
|
+
// async lastHour(ipOrUser: string, options?: { user: boolean }): Promise<AccessSettings['callLimits'] | undefined> {
|
|
26
|
+
// const secondAgo = dayjs().subtract(1, 'second').toDate();
|
|
27
|
+
// const minuteAgo = dayjs().subtract(1, 'minute').toDate();
|
|
28
|
+
// const hourAgo = dayjs().subtract(1, 'hour').toDate();
|
|
29
|
+
// const quarterAgo = dayjs().subtract(15, 'minutes').toDate();
|
|
30
|
+
// const match = {
|
|
31
|
+
// $match: {
|
|
32
|
+
// date: { $gte: hourAgo },
|
|
33
|
+
// },
|
|
34
|
+
// };
|
|
35
|
+
// if (options?.user) {
|
|
36
|
+
// match.$match['metadata.user'] = ipOrUser;
|
|
37
|
+
// }
|
|
38
|
+
// if (!options?.user) {
|
|
39
|
+
// match.$match['metadata.ip'] = ipOrUser;
|
|
40
|
+
// }
|
|
41
|
+
// const count = await this.model.db.aggregate<AccessSettings['callLimits']>([
|
|
42
|
+
// match,
|
|
43
|
+
// {
|
|
44
|
+
// $group: {
|
|
45
|
+
// _id: null,
|
|
46
|
+
// second: {
|
|
47
|
+
// $sum: {
|
|
48
|
+
// $cond: [{ $gte: ['$date', secondAgo] }, 1, 0],
|
|
49
|
+
// },
|
|
50
|
+
// },
|
|
51
|
+
// minute: {
|
|
52
|
+
// $sum: {
|
|
53
|
+
// $cond: [{ $gte: ['$date', minuteAgo] }, 1, 0],
|
|
54
|
+
// },
|
|
55
|
+
// },
|
|
56
|
+
// quarter: {
|
|
57
|
+
// $sum: {
|
|
58
|
+
// $cond: [{ $gte: ['$date', quarterAgo] }, 1, 0],
|
|
59
|
+
// },
|
|
60
|
+
// },
|
|
61
|
+
// hour: {
|
|
62
|
+
// $sum: 1,
|
|
63
|
+
// },
|
|
64
|
+
// },
|
|
65
|
+
// },
|
|
66
|
+
// ]).toArray();
|
|
67
|
+
// if (count.length) {
|
|
68
|
+
// return count[0];
|
|
69
|
+
// }
|
|
70
|
+
// return;
|
|
71
|
+
// }
|
|
72
|
+
// /**
|
|
73
|
+
// applies the provided settings that limit the requests per second, minute, 15 minutes and hour.
|
|
74
|
+
// responds with code 429 if the limits are exceeded
|
|
75
|
+
// ```TS
|
|
76
|
+
// callLimits: {
|
|
77
|
+
// second: number,
|
|
78
|
+
// minute: number,
|
|
79
|
+
// quarter: number
|
|
80
|
+
// hour: number
|
|
81
|
+
// }
|
|
82
|
+
// ```
|
|
83
|
+
// */
|
|
84
|
+
// async applyLimits(req: Request, res: Response, next: NextFunction, options?: { user: boolean }) {
|
|
85
|
+
// // Retrieve the last hour's access log for the requesting IP address
|
|
86
|
+
// const accessLog = await this.lastHour(options?.user && req.auth?.sub ? req.auth.sub : req.ip as string, options);
|
|
87
|
+
// // Check if accessLog is available to proceed with rate limiting checks
|
|
88
|
+
// if (accessLog) {
|
|
89
|
+
// // Check if the number of requests in the last second exceeds the limit
|
|
90
|
+
// if (accessLog.second >= this.settings.callLimits.second) {
|
|
91
|
+
// this.sendResponse(this.settings.callLimits.second.toString(), 'per second', res);
|
|
92
|
+
// return false;
|
|
93
|
+
// }
|
|
94
|
+
// // Check if the number of requests in the last minute exceeds the limit
|
|
95
|
+
// if (accessLog.minute >= this.settings.callLimits.minute) {
|
|
96
|
+
// this.sendResponse(this.settings.callLimits.minute.toString(), 'per minute', res);
|
|
97
|
+
// return false;
|
|
98
|
+
// }
|
|
99
|
+
// // Check if the number of requests in the last quarter-hour exceeds the limit
|
|
100
|
+
// if (accessLog.quarter >= this.settings.callLimits.quarter) {
|
|
101
|
+
// this.sendResponse(this.settings.callLimits.quarter.toString(), 'per 15 minutes', res);
|
|
102
|
+
// return false;
|
|
103
|
+
// }
|
|
104
|
+
// // Check if the number of requests in the last hour exceeds the limit
|
|
105
|
+
// if (accessLog.hour >= this.settings.callLimits.hour) {
|
|
106
|
+
// this.sendResponse(this.settings.callLimits.hour.toString(), 'per hour', res);
|
|
107
|
+
// return false;
|
|
108
|
+
// }
|
|
109
|
+
// }
|
|
110
|
+
// // If the request does not exceed any rate limits, continue to the next middleware
|
|
111
|
+
// next();
|
|
112
|
+
// return true;
|
|
113
|
+
// }
|
|
114
|
+
// sendResponse(limit: string, interval: string, res: Response) {
|
|
115
|
+
// res.set('X-RateLimit-Limit', limit);
|
|
116
|
+
// res.set('X-RateLimit-Interval', interval);
|
|
117
|
+
// res.status(HttpStatusCode.TOO_MANY_REQUESTS).end();
|
|
118
|
+
// }
|
|
119
|
+
// }
|
|
109
120
|
//# sourceMappingURL=access.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"access.service.js","sourceRoot":"","sources":["../../../src/services/access.service.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"access.service.js","sourceRoot":"","sources":["../../../src/services/access.service.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,mDAAmD;AACnD,uDAAuD;AACvD,6DAA6D;AAC7D,oDAAoD;AACpD,sEAAsE;AAEtE,0BAA0B;AAC1B,kBAAkB;AAClB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,mBAAmB;AACnB,MAAM;AACN,KAAK;AAEL,kEAAkE;AAElE,yBAAyB;AAEzB,8BAA8B;AAE9B,4CAA4C;AAE5C,eAAe;AAEf,gCAAgC;AAEhC,MAAM;AAEN,yBAAyB;AAEzB,sEAAsE;AAEtE,MAAM;AAEN,uHAAuH;AAEvH,gEAAgE;AAChE,gEAAgE;AAChE,4DAA4D;AAC5D,mEAAmE;AAEnE,sBAAsB;AACtB,kBAAkB;AAClB,mCAAmC;AACnC,WAAW;AACX,SAAS;AAET,2BAA2B;AAE3B,kDAAkD;AAElD,QAAQ;AAER,4BAA4B;AAE5B,gDAAgD;AAEhD,QAAQ;AAER,kFAAkF;AAClF,eAAe;AACf,UAAU;AACV,oBAAoB;AACpB,uBAAuB;AACvB,sBAAsB;AACtB,sBAAsB;AACtB,+DAA+D;AAC/D,iBAAiB;AACjB,eAAe;AACf,sBAAsB;AACtB,sBAAsB;AACtB,+DAA+D;AAC/D,iBAAiB;AACjB,eAAe;AACf,uBAAuB;AACvB,sBAAsB;AACtB,gEAAgE;AAChE,iBAAiB;AACjB,eAAe;AACf,oBAAoB;AACpB,uBAAuB;AACvB,eAAe;AACf,aAAa;AACb,WAAW;AACX,oBAAoB;AAEpB,0BAA0B;AAE1B,yBAAyB;AAEzB,QAAQ;AAER,cAAc;AAEd,MAAM;AAEN,QAAQ;AACR,uGAAuG;AACvG,0DAA0D;AAC1D,gBAAgB;AAChB,wBAAwB;AACxB,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,2BAA2B;AAC3B,YAAY;AACZ,cAAc;AACd,UAAU;AACV,sGAAsG;AAEtG,2EAA2E;AAC3E,wHAAwH;AAExH,8EAA8E;AAC9E,uBAAuB;AAEvB,gFAAgF;AAChF,mEAAmE;AAEnE,4FAA4F;AAC5F,wBAAwB;AAExB,UAAU;AAEV,gFAAgF;AAChF,mEAAmE;AAEnE,4FAA4F;AAC5F,wBAAwB;AAExB,UAAU;AAEV,sFAAsF;AACtF,qEAAqE;AAErE,iGAAiG;AACjG,wBAAwB;AAExB,UAAU;AAEV,8EAA8E;AAC9E,+DAA+D;AAE/D,wFAAwF;AACxF,wBAAwB;AAExB,UAAU;AAEV,QAAQ;AAER,yFAAyF;AACzF,cAAc;AACd,mBAAmB;AAEnB,MAAM;AAEN,mEAAmE;AAEnE,2CAA2C;AAC3C,iDAAiD;AACjD,0DAA0D;AAE1D,MAAM;AAEN,IAAI"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { UserAppOptionsRequired } from '@lilaquadrat/interfaces';
|
|
2
|
-
import
|
|
2
|
+
import { GoogleGenAI } from '@google/genai';
|
|
3
3
|
export declare class Ai {
|
|
4
|
-
provider:
|
|
5
|
-
|
|
4
|
+
provider: GoogleGenAI;
|
|
5
|
+
model: string;
|
|
6
|
+
constructor(key: string, model: string);
|
|
6
7
|
tokenUsage(date: string | undefined, options: UserAppOptionsRequired): Promise<import("bson").Document>;
|
|
7
8
|
generateTextForProject(input: Object, instructions: string, element: string | undefined, context: {
|
|
8
9
|
project?: string;
|