Remove operator parameter
This commit is contained in:
parent
28289ba2d5
commit
7bdf2036c6
6 changed files with 10 additions and 8 deletions
|
@ -8,7 +8,7 @@
|
|||
"options.customTemplate": { "message": "Custom template" },
|
||||
"options.systemInstructions": { "message": "System instructions" },
|
||||
"options.reset": { "message": "Reset to default" },
|
||||
"options.placeholders": { "message": "Placeholders: {{system}}, {{email}}, {{operator}}, {{query}}" },
|
||||
"options.placeholders": { "message": "Placeholders: {{system}}, {{email}}, {{query}}" },
|
||||
"template.openai": { "message": "OpenAI / ChatML" },
|
||||
"template.qwen": { "message": "Qwen" },
|
||||
"template.mistral": { "message": "Mistral" },
|
||||
|
|
|
@ -156,12 +156,11 @@ function buildSystemPrompt() {
|
|||
return SYSTEM_PREFIX + (gCustomSystemPrompt || DEFAULT_CUSTOM_SYSTEM_PROMPT) + SYSTEM_SUFFIX;
|
||||
}
|
||||
|
||||
function buildPrompt(body, criterion, opName) {
|
||||
function buildPrompt(body, criterion) {
|
||||
console.log(`[ai-filter][ExpressionSearchFilter] Building prompt with criterion: "${criterion}"`);
|
||||
const data = {
|
||||
system: buildSystemPrompt(),
|
||||
email: body,
|
||||
operator: opName,
|
||||
query: criterion,
|
||||
};
|
||||
let template = gTemplateText || loadTemplate(gTemplateName);
|
||||
|
@ -189,7 +188,7 @@ class ClassificationTerm extends CustomerTermBase {
|
|||
|
||||
let body = getPlainText(msgHdr);
|
||||
let payload = JSON.stringify({
|
||||
prompt: buildPrompt(body, value, opName),
|
||||
prompt: buildPrompt(body, value),
|
||||
max_tokens: 4096,
|
||||
temperature: 0.6,
|
||||
top_p: 0.95,
|
||||
|
|
|
@ -132,7 +132,7 @@
|
|||
<div id="custom-template-container" class="form-group" style="display:none">
|
||||
<label>Custom template</label>
|
||||
<textarea id="custom-template" rows="6" cols="60" placeholder="Enter your custom template here..."></textarea>
|
||||
<p class="placeholder-text">Placeholders: {{system}}, {{email}}, {{operator}}, {{query}}</p>
|
||||
<p class="placeholder-text">Placeholders: {{system}}, {{email}}, {{query}}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
|
|
@ -3,5 +3,6 @@
|
|||
Email:
|
||||
{{email}}
|
||||
|
||||
Criterion ({{operator}}): {{query}}
|
||||
Criterion: {{query}}
|
||||
Remember to ONLY return the JSON object described in the system instructions.
|
||||
[/INST]
|
||||
|
|
|
@ -5,5 +5,6 @@
|
|||
```
|
||||
{{email}}
|
||||
```
|
||||
Classification Criterion ({{operator}}): {{query}}<|im_end|>
|
||||
Classification Criterion: {{query}}
|
||||
Remember to ONLY return the JSON object described in the system instructions.<|im_end|>
|
||||
<|im_start|>assistant
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
Email:
|
||||
{{email}}
|
||||
|
||||
Criterion ({{operator}}): {{query}}
|
||||
Criterion: {{query}}
|
||||
Remember to ONLY return the JSON object described in the system instructions.
|
||||
<|im_end|>
|
||||
<|im_start|>assistant
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue