From 97fbd4bd38e1fc033802a5a837356c3691b91e2c Mon Sep 17 00:00:00 2001 From: Haouari haitam Kouider <57036855+haouarihk@users.noreply.github.com> Date: Fri, 26 Jan 2024 03:06:27 +0100 Subject: [PATCH] 0.0.2 --- README.md | 4 + manifest.json | 2 +- prompts/summary.md | 17 ++ prompts/testContext.md | 31 +++ prompts/testCustomForm.md | 354 +++++++++++++++++++++++++++++++++++ prompts/testLangchainPull.md | 33 ++++ 6 files changed, 440 insertions(+), 1 deletion(-) create mode 100644 prompts/summary.md create mode 100644 prompts/testContext.md create mode 100644 prompts/testCustomForm.md create mode 100644 prompts/testLangchainPull.md diff --git a/README.md b/README.md index e3e33df..afca178 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,7 @@ | Prompt | Usage | | --------------- | -------------------------------------------------------- | | conceptLinker | Generate notes and link them from the current note's words | +| summary | Summarizes the text into a sentence | +| testContext | Test for Context| +| testCustomForm | Test for Custom forms (containing examples for different inputs) | +| testLangchainPull | Test for Langchain pull function | \ No newline at end of file diff --git a/manifest.json b/manifest.json index f899bff..586b158 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "packageId": "Experimental", "name": "Experimental Package", - "version": "0.0.1", + "version": "0.0.2", "minTextGeneratorVersion": "0.6.6", "description": "Contains experimental templates", "author": "Noureddine", diff --git a/prompts/summary.md b/prompts/summary.md new file mode 100644 index 0000000..a736fc2 --- /dev/null +++ b/prompts/summary.md @@ -0,0 +1,17 @@ +--- +promptId: summary +name: summary +author: Noureddine +title: Summarizes Text +description: Summarizes Big chunk of text into a sentence +mode: insert +chain.type: map_reduce +splitter.chunkSize: 1000 +splitter.chunkOverlap: 100 +max_tokens: 1000 +temperature: 0 +chain.maxTokens: 1000 +--- +{{tg_selection}} +*** +{{output}} \ No newline at end of file diff --git a/prompts/testContext.md b/prompts/testContext.md new file mode 100644 index 0000000..0627075 --- /dev/null +++ b/prompts/testContext.md @@ -0,0 +1,31 @@ +--- +promptId: testContext +name: testContext +author: Noureddine +title: testContext +description: testContext +commands: + - generate +mode: insert +max_tokens: 1000 +noGenMode: true +--- +*** + +## TG Selection: +``` +{{tg_selection}} +``` +## Selection: +``` +{{selection}} +``` +## Context: +``` +{{context}} +``` +## Note Content: +``` +{{content}} +``` + diff --git a/prompts/testCustomForm.md b/prompts/testCustomForm.md new file mode 100644 index 0000000..4fe65ea --- /dev/null +++ b/prompts/testCustomForm.md @@ -0,0 +1,354 @@ +--- +promptId: testCustomForm +author: Haitam +name: Custom Form test +description: Test for custom form also contains examples +disableProvider: true +strict: false +--- +```json:form +{ + "title": "Widgets", + + "properties": { + "stringFormats": { + + "type": "object", + + "title": "String formats", + + "properties": { + + "email": { + + "type": "string", + + "format": "email" + + }, + + "uri": { + + "type": "string", + "format": "uri" + + } + + } + }, + + "boolean": { + + "type": "object", + + "title": "Boolean field", + + "properties": { + + "default": { + + "type": "boolean", + + "title": "checkbox (default)", + + "description": "This is the checkbox-description" + + }, + + "radio": { + + "type": "boolean", + + "title": "radio buttons", + + "description": "This is the radio-description" + + }, + + "select": { + + "type": "boolean", + + "title": "select box", + + "description": "This is the select-description" + + } + + } + }, + + "string": { + + "type": "object", + + "title": "String field", + + "properties": { + + "default": { + + "type": "string", + + "title": "text input (default)" + + }, + + "textarea": { + + "type": "string", + + "title": "textarea" + + }, + + "placeholder": { + + "type": "string" + + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "color": { + + "type": "string", + + "title": "color picker", + + "default": "#151ce6" + + } + + } + }, + + "secret": { + + "type": "string", + + "default": "I'm a hidden string." + }, + + "disabled": { + + "type": "string", + + "title": "A disabled field", + + "default": "I am disabled." + }, + + "readonly": { + + "type": "string", + + "title": "A readonly field", + + "default": "I am read-only." + }, + + "readonly2": { + + "type": "string", + + "title": "Another readonly field", + + "default": "I am also read-only.", + + "readOnly": true + }, + + "widgetOptions": { + + "title": "Custom widget with options", + + "type": "string", + + "default": "I am yellow" + }, + + "selectWidgetOptions": { + + "title": "Custom select widget with options", + + "type": "string", + + "enum": [ + + "foo", + + "bar" + + ] + }, + + "selectWidgetOptions2": { + + "title": "Custom select widget with options, overriding the enum titles.", + + "type": "string", + + "oneOf": [ + + { + + "const": "foo", + + "title": "Foo dfdfdfdf" + + }, + + { + + "const": "bar", + + "title": "Ba dfdfdfddfdfdfdfdfr" + + } + + ] + } + }, +  + uiSchema: { + +   "boolean": { + +     "radio": { + +       "ui:widget": "radio" + +     }, + +     "select": { + +       "ui:widget": "select" + +     } + +   }, + +   "string": { + +     "textarea": { + +       "ui:widget": "textarea", + +       "ui:options": { + +         "rows": 5 + +       } + +     }, + +     "placeholder": { + +       "ui:placeholder": "This is a placeholder" + +     }, + +     "color": { + +       "ui:widget": "color" + +     } + +   }, + +   "secret": { + +     "ui:widget": "hidden" + +   }, + +   "disabled": { + +     "ui:disabled": true + +   }, + +   "readonly": { + +     "ui:readonly": true + +   }, + +   "widgetOptions": { + +     "ui:options": { + +       "backgroundColor": "yellow" + +     } + +   }, + +   "selectWidgetOptions": { + +     "ui:options": { + +       "backgroundColor": "pink" + +     } + +   } + }, + + formData:{ + +   "string": { + +     "color": "#151ce6", + +     "default": "Hello...", + +     "textarea": "... World" + +   }, + +   "secret": "I'm a hidden string.", + +   "disabled": "I am disabled.", + +   "readonly": "I am read-only.", + +   "readonly2": "I am also read-only.", + +   "widgetOptions": "I am yellow", + +   "stringFormats": { + +     "email": "chuck@norris.net", + +     "uri": "http://chucknorris.com/" + +   }, + +   "boolean": { + +     "default": true, + +     "radio": true, + +     "select": true + +   } + } +} +``` + + +```handlebars +{{log this}} +``` + +*** + +*** +# There is nothing here +you can access the variables as usual by referencing them by name like +\{\{stringFormats.email\}\} `{{stringFormats.email}}` + diff --git a/prompts/testLangchainPull.md b/prompts/testLangchainPull.md new file mode 100644 index 0000000..50889d2 --- /dev/null +++ b/prompts/testLangchainPull.md @@ -0,0 +1,33 @@ +--- +promptId: testLangchainPull +name: Test Langchain Pull +description: test Langchain Pull +commands: + - generate +disableProvider: true +type: wrapper +--- + +This is running the text generation with `gitmaxd/onboard-email` template, +the json you see in there, is from their example. +```handlebars +{{#run "simpleGen"}} + {{#runLang "rlm/text-to-sql"}} + { + "input": "{{escp2 tg_selection}}" + } + {{/runLang}} +{{/run}} +``` + +*** +*** +# Output: +This is the output of {{name}} template. +## testing run lang: + this is the result of the generate template, from the previews shown json. + + +{{get "simpleGen"}} + +