Skip to content

Commit

Permalink
0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
haouarihk authored Jan 12, 2024
1 parent c03bff4 commit 0ca6f4c
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 23 deletions.
18 changes: 9 additions & 9 deletions manifest.json
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"
}
14 changes: 0 additions & 14 deletions prompts/getExample.md

This file was deleted.

54 changes: 54 additions & 0 deletions prompts/summarize.md
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}}

0 comments on commit 0ca6f4c

Please sign in to comment.