From ea67c56d22467432869bf6de3138d037f2321250 Mon Sep 17 00:00:00 2001 From: mic Date: Sun, 7 Dec 2025 18:07:57 +0100 Subject: [PATCH] system_prompt added to the anthropic class. See #549 --- js/api/anthropic.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/api/anthropic.js b/js/api/anthropic.js index 1f03b571..e1bb27a5 100644 --- a/js/api/anthropic.js +++ b/js/api/anthropic.js @@ -24,6 +24,7 @@ export class Anthropic { apiKey = ''; version = ''; model = ''; + system_prompt = ''; max_tokens = 4096; stream = false; @@ -31,12 +32,14 @@ export class Anthropic { apiKey = '', version = '', model = '', + system_prompt = '', max_tokens = 4096, stream = false, } = {}) { this.apiKey = apiKey; this.version = version; this.model = model; + this.system_prompt = system_prompt; this.max_tokens = max_tokens > 0 ? max_tokens : 4096; this.stream = stream; } @@ -95,6 +98,7 @@ export class Anthropic { body: JSON.stringify({ model: this.model, max_tokens: this.max_tokens, + system: this.system_prompt, messages: messages, stream: this.stream, }),