diff --git a/manifest.json b/manifest.json index 53f4839..323a6e4 100644 --- a/manifest.json +++ b/manifest.json @@ -1,11 +1,11 @@ { - "packageId": "Put_Package_Id_Here", - "name": "Name of your package", + "packageId": "smartConnections", + "name": "Smart Connections Package", "version": "0.0.1", - "minTextGeneratorVersion": "0.1.0", - "description": "The description of the content of this package", - "author": "Your name", - "tags": "writing, brainstorming", - "authorUrl": "Support URL", - "repo": "username/repo" -} + "minTextGeneratorVersion": "0.6.0", + "description": "Contains Smart Connection Templates and support for Smart Connections for other templates (Script)", + "author": "Noureddine", + "tags": "smartConnections,smart-connections", + "authorUrl": "https://www.buymeacoffee.com/haouarine", + "repo": "text-gen/tg-smartConnections" +} \ No newline at end of file diff --git a/prompts/getExample.md b/prompts/getExample.md deleted file mode 100644 index adbf70c..0000000 --- a/prompts/getExample.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -promptId: getExample -name: ✉️ Emoji + Short description -description: longer description -author: author Name -tags: tag1, tag2 -required_values: val1, val2 -version: 0.0.1 ---- -content: -{{context}} -prompt: -Write an example about content -example: diff --git a/prompts/summarize.md b/prompts/summarize.md new file mode 100644 index 0000000..4fd94ff --- /dev/null +++ b/prompts/summarize.md @@ -0,0 +1,54 @@ +--- +promptId: summarize +name: 🗞️Summarize The Results of Smart Connections +description: summarize +author: Noureddine +tags: + - smart-connections +version: 0.0.1 +disableProvider: true +provider: +--- +{{#script}} +```js +if(!app.plugins.plugins["smart-connections"]) + return error("Smart connection plugin not installed") +``` +{{/script}} +*** +This input template is currently disabled due to the 'disabledProvider' setting being set to true. + +If you wish to utilize this template with a provider, such as Chatbot or another service, please follow these steps: +- Enable the provider by setting 'disabledProvider' to false. +- Cut and paste everything from the output template into this section. +- Replace the content in the output template with '{{output}}'. +- Remember to delete this instruction text. +*** +{{#script}} +```js +const query = this.tg_selection; +const results = await app.plugins.plugins["smart-connections"].api.search(query); +const contextResults = await Promise.all( + results.slice(0, 5).map(r => + app.plugins.plugins["smart-connections"].file_retriever(r.link, { lines: 10, max_chars: 1000 }) + ) +); +const context = contextResults.join("\n---\n"); + +const summary = await gen(` +Query: +${query} + +Outcomes: +${context} + +Prompt: +Synthesize the results section, highlighting the relationship between the initial query and the outcomes. Structure the content using Markdown formatting to establish a clear information hierarchy. This should include titles, subtitles, and varying font sizes. For improved readability, bolden all verbs and specific action-oriented phrases. Ensure that the Markdown elements are properly used to organize the content systematically. + +Summary: + +`) + +return summary; +``` +{{/script}}