natureco-cli 2.13.9 → 2.13.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "natureco-cli",
3
- "version": "2.13.9",
3
+ "version": "2.13.10",
4
4
  "description": "NatureCo AI Bot Terminal Interface",
5
5
  "main": "bin/natureco.js",
6
6
  "bin": {
@@ -211,7 +211,7 @@ body::before{
211
211
  <div class="header-bot-name" id="header-bot-name">Nature Bot</div>
212
212
  <div class="header-bot-model" id="header-bot-model">NatureCo</div>
213
213
  </div>
214
- <div class="version-badge" id="version-badge">v2.13.9</div>
214
+ <div class="version-badge" id="version-badge">v2.13.10</div>
215
215
  </div>
216
216
  <div class="messages" id="messages"></div>
217
217
  <div class="input-area">
@@ -341,7 +341,7 @@ function dashboard(action) {
341
341
  apiKey: cfg.apiKey,
342
342
  defaultBot: cfg.defaultBot,
343
343
  defaultBotId: cfg.defaultBotId,
344
- version: 'v2.13.9',
344
+ version: 'v2.13.10',
345
345
  bots: cfg.bots || [],
346
346
  telegramToken: cfg.telegramToken || null,
347
347
  whatsappConnected: cfg.whatsappConnected || false,
package/src/utils/api.js CHANGED
@@ -414,20 +414,30 @@ function formatToolsForAnthropic() {
414
414
  async function sendMessageOpenAICompatible(providerConfig, messages, tools) {
415
415
  const endpoint = `${providerConfig.url}/chat/completions`;
416
416
 
417
+ // Log request size before sending
418
+ const requestBody = {
419
+ model: providerConfig.model,
420
+ messages: messages,
421
+ tools: tools,
422
+ tool_choice: 'auto',
423
+ temperature: 0.7,
424
+ max_tokens: 2000,
425
+ };
426
+
427
+ const bodyStr = JSON.stringify(requestBody);
428
+ console.log('[API] Request size:', bodyStr.length, 'chars, ~', Math.round(bodyStr.length / 4), 'tokens');
429
+ console.log('[API] Messages count:', messages.length);
430
+ console.log('[API] Tools count:', tools?.length || 0);
431
+ console.log('[API] System prompt length:', messages[0]?.content?.length || 0);
432
+
417
433
  const response = await fetch(endpoint, {
418
434
  method: 'POST',
419
435
  headers: {
420
436
  'Authorization': `Bearer ${providerConfig.apiKey}`,
421
437
  'Content-Type': 'application/json',
422
438
  },
423
- body: JSON.stringify({
424
- model: providerConfig.model,
425
- messages: messages,
426
- tools: tools,
427
- tool_choice: 'auto',
428
- temperature: 0.7,
429
- max_tokens: 2000,
430
- }),
439
+ body: bodyStr,
440
+ });
431
441
  });
432
442
 
433
443
  if (!response.ok) {