Added anthropic_system_prompt option in the options page. See #549

This commit is contained in:
mic 2025-12-07 18:04:03 +01:00
parent dc3c75c90e
commit 6211fa5a85
3 changed files with 22 additions and 0 deletions

View file

@ -1688,5 +1688,13 @@
"DeselectAll": {
"message": "Deselect All",
"description": ""
},
"Anthropic_System_Prompt": {
"message": "System Prompt",
"description": ""
},
"Anthropic_System_Prompt_Info": {
"message": "You can improve Claude performance by using a System Prompt to give it a role. This technique, known as role prompting, is the most powerful way to use system prompts with Claude. The right role can turn Claude from a general assistant into your virtual domain expert.",
"description": ""
}
}

View file

@ -50,6 +50,7 @@ export const prefs_default = {
anthropic_model: '',
anthropic_version: '2023-06-01',
anthropic_max_tokens: 4096,
anthropic_system_prompt: '',
dynamic_menu_force_enter: false,
dynamic_menu_order_alphabet: true,
placeholders_use_default_value: false,

View file

@ -397,6 +397,19 @@ export async function injectConnectionUI({
</label>
</td>
</tr>
<tr class="conntype_anthropic_api${tr_class ? ` ${tr_class}` : ''}">
<td>
<label>
<span class="opt_title">__MSG_Anthropic_System_Prompt__</span>
</label>
</td>
<td>
<label>
<textarea id="anthropic_system_prompt" name="anthropic_system_prompt" class="option-input option-textarea"></textarea>
<br>__MSG_Anthropic_System_Prompt_Info__
</label>
</td>
</tr>
<tr class="conntype_anthropic_api${tr_class ? ` ${tr_class}` : ''}">
<td>
<label>