agentaudit 3.13.7 → 3.13.8
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 +2 -2
- package/package.json +1 -1
package/cli.mjs
CHANGED
|
@@ -2896,7 +2896,7 @@ async function callLlm(llmConfig, systemPrompt, userMessage) {
|
|
|
2896
2896
|
const res = await fetch(llmConfig.url, {
|
|
2897
2897
|
method: 'POST',
|
|
2898
2898
|
headers: { 'x-api-key': apiKey, 'anthropic-version': '2023-06-01', 'content-type': 'application/json' },
|
|
2899
|
-
body: JSON.stringify({ model: llmConfig.model, max_tokens:
|
|
2899
|
+
body: JSON.stringify({ model: llmConfig.model, max_tokens: 32768, system: systemPrompt, messages: [{ role: 'user', content: userMessage }] }),
|
|
2900
2900
|
signal: AbortSignal.timeout(180_000),
|
|
2901
2901
|
});
|
|
2902
2902
|
data = await safeJsonParse(res, llmConfig);
|
|
@@ -2957,7 +2957,7 @@ async function callLlm(llmConfig, systemPrompt, userMessage) {
|
|
|
2957
2957
|
const res = await fetch(llmConfig.url, {
|
|
2958
2958
|
method: 'POST',
|
|
2959
2959
|
headers,
|
|
2960
|
-
body: JSON.stringify({ model: llmConfig.model, max_tokens:
|
|
2960
|
+
body: JSON.stringify({ model: llmConfig.model, max_tokens: 32768, messages: [{ role: 'system', content: systemPrompt }, { role: 'user', content: userMessage }] }),
|
|
2961
2961
|
signal: AbortSignal.timeout(180_000),
|
|
2962
2962
|
});
|
|
2963
2963
|
data = await safeJsonParse(res, llmConfig);
|