agentaudit 3.12.4 → 3.12.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.mjs +4 -4
- package/package.json +1 -1
package/cli.mjs
CHANGED
|
@@ -2598,8 +2598,8 @@ async function callLlm(llmConfig, systemPrompt, userMessage) {
|
|
|
2598
2598
|
const res = await fetch(llmConfig.url, {
|
|
2599
2599
|
method: 'POST',
|
|
2600
2600
|
headers: { 'x-api-key': apiKey, 'anthropic-version': '2023-06-01', 'content-type': 'application/json' },
|
|
2601
|
-
body: JSON.stringify({ model: llmConfig.model, max_tokens:
|
|
2602
|
-
signal: AbortSignal.timeout(
|
|
2601
|
+
body: JSON.stringify({ model: llmConfig.model, max_tokens: 16384, system: systemPrompt, messages: [{ role: 'user', content: userMessage }] }),
|
|
2602
|
+
signal: AbortSignal.timeout(180_000),
|
|
2603
2603
|
});
|
|
2604
2604
|
data = await res.json();
|
|
2605
2605
|
if (data.error) {
|
|
@@ -2645,8 +2645,8 @@ async function callLlm(llmConfig, systemPrompt, userMessage) {
|
|
|
2645
2645
|
const res = await fetch(llmConfig.url, {
|
|
2646
2646
|
method: 'POST',
|
|
2647
2647
|
headers,
|
|
2648
|
-
body: JSON.stringify({ model: llmConfig.model, max_tokens:
|
|
2649
|
-
signal: AbortSignal.timeout(
|
|
2648
|
+
body: JSON.stringify({ model: llmConfig.model, max_tokens: 16384, messages: [{ role: 'system', content: systemPrompt }, { role: 'user', content: userMessage }] }),
|
|
2649
|
+
signal: AbortSignal.timeout(180_000),
|
|
2650
2650
|
});
|
|
2651
2651
|
data = await res.json();
|
|
2652
2652
|
if (data.error) {
|