generated from text-gen/templates-package
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
63 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}} |