Add harmony prompt template
This commit is contained in:
parent
42d013fccd
commit
6d169e1b8c
Notes:
Jordan Wages
2026-01-07 13:51:08 -06:00
Related to #1
6 changed files with 26 additions and 2 deletions
|
|
@ -10,7 +10,7 @@ This file provides guidelines for codex agents contributing to the Sortana proje
|
||||||
- `options/`: The options page HTML, JavaScript and bundled Bulma CSS (v1.0.3).
|
- `options/`: The options page HTML, JavaScript and bundled Bulma CSS (v1.0.3).
|
||||||
- `details.html` and `details.js`: View AI reasoning and clear cache for a message.
|
- `details.html` and `details.js`: View AI reasoning and clear cache for a message.
|
||||||
- `resources/`: Images and other static files.
|
- `resources/`: Images and other static files.
|
||||||
- `prompt_templates/`: Prompt template files for the AI service.
|
- `prompt_templates/`: Prompt template files for the AI service (openai, qwen, mistral, harmony).
|
||||||
- `build-xpi.ps1`: PowerShell script to package the extension.
|
- `build-xpi.ps1`: PowerShell script to package the extension.
|
||||||
- `build-xpi.sh`: Bash script to package the extension.
|
- `build-xpi.sh`: Bash script to package the extension.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ expecting a `match` (or `matched`) boolean plus a `reason` string.
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- **Configurable endpoint** – set the classification service base URL on the options page.
|
- **Configurable endpoint** – set the classification service base URL on the options page.
|
||||||
- **Prompt templates** – choose between several model formats or provide your own custom template.
|
- **Prompt templates** – choose between OpenAI/ChatML, Qwen, Mistral, Harmony (gpt-oss), or provide your own custom template.
|
||||||
- **Custom system prompts** – tailor the instructions sent to the model for more precise results.
|
- **Custom system prompts** – tailor the instructions sent to the model for more precise results.
|
||||||
- **Persistent result caching** – classification results and reasoning are saved to disk so messages aren't re-evaluated across restarts.
|
- **Persistent result caching** – classification results and reasoning are saved to disk so messages aren't re-evaluated across restarts.
|
||||||
- **Advanced parameters** – tune generation settings like temperature, top‑p and more from the options page.
|
- **Advanced parameters** – tune generation settings like temperature, top‑p and more from the options page.
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
"template.openai": { "message": "OpenAI / ChatML" },
|
"template.openai": { "message": "OpenAI / ChatML" },
|
||||||
"template.qwen": { "message": "Qwen" },
|
"template.qwen": { "message": "Qwen" },
|
||||||
"template.mistral": { "message": "Mistral" },
|
"template.mistral": { "message": "Mistral" },
|
||||||
|
"template.harmony": { "message": "Harmony (gpt-oss)" },
|
||||||
"template.custom": { "message": "Custom" },
|
"template.custom": { "message": "Custom" },
|
||||||
"options.save": { "message": "Save" },
|
"options.save": { "message": "Save" },
|
||||||
"options.debugLogging": { "message": "Enable debug logging" },
|
"options.debugLogging": { "message": "Enable debug logging" },
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "prompt_templates", "prompt_
|
||||||
prompt_templates\mistral.txt = prompt_templates\mistral.txt
|
prompt_templates\mistral.txt = prompt_templates\mistral.txt
|
||||||
prompt_templates\openai.txt = prompt_templates\openai.txt
|
prompt_templates\openai.txt = prompt_templates\openai.txt
|
||||||
prompt_templates\qwen.txt = prompt_templates\qwen.txt
|
prompt_templates\qwen.txt = prompt_templates\qwen.txt
|
||||||
|
prompt_templates\harmony.txt = prompt_templates\harmony.txt
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "resources", "resources", "{68A87938-5C2B-49F5-8AAA-8A34FBBFD854}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "resources", "resources", "{68A87938-5C2B-49F5-8AAA-8A34FBBFD854}"
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,7 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||||
openai: browser.i18n.getMessage('template.openai'),
|
openai: browser.i18n.getMessage('template.openai'),
|
||||||
qwen: browser.i18n.getMessage('template.qwen'),
|
qwen: browser.i18n.getMessage('template.qwen'),
|
||||||
mistral: browser.i18n.getMessage('template.mistral'),
|
mistral: browser.i18n.getMessage('template.mistral'),
|
||||||
|
harmony: browser.i18n.getMessage('template.harmony'),
|
||||||
custom: browser.i18n.getMessage('template.custom')
|
custom: browser.i18n.getMessage('template.custom')
|
||||||
};
|
};
|
||||||
const templateSelect = document.getElementById('template');
|
const templateSelect = document.getElementById('template');
|
||||||
|
|
|
||||||
21
prompt_templates/harmony.txt
Normal file
21
prompt_templates/harmony.txt
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
<|start|>system<|message|>You are ChatGPT, a large language model trained by OpenAI.
|
||||||
|
Knowledge cutoff: 2024-06
|
||||||
|
Current date: 2025-06-28
|
||||||
|
|
||||||
|
Reasoning: medium
|
||||||
|
|
||||||
|
# Valid channels: analysis, commentary, final. Channel must be included for every message.<|end|>
|
||||||
|
<|start|>developer<|message|># Instructions
|
||||||
|
|
||||||
|
{{system}}<|end|>
|
||||||
|
<|start|>user<|message|>**Email Contents**
|
||||||
|
```
|
||||||
|
{{email}}
|
||||||
|
```
|
||||||
|
Classification Criterion: {{query}}
|
||||||
|
Remember, return ONLY a JSON object on a single line of the form:
|
||||||
|
{"match": true, "reason": "<short explanation>"} - if the email satisfies the criterion
|
||||||
|
{"match": false, "reason": "<short explanation>"} - otherwise
|
||||||
|
|
||||||
|
Do not add any other keys, text, or formatting.<|end|>
|
||||||
|
<|start|>assistant
|
||||||
Loading…
Add table
Add a link
Reference in a new issue