@inferencesh/sdk 0.4.13 → 0.4.15

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.
Files changed (2) hide show
  1. package/dist/client.js +4 -4
  2. package/package.json +1 -1
package/dist/client.js CHANGED
@@ -409,7 +409,7 @@ class Agent {
409
409
  const isTemplate = typeof this.config === 'string';
410
410
  const hasCallbacks = !!(options.onMessage || options.onChat || options.onToolCall);
411
411
  // Process files - either already uploaded (FileDTO with uri) or needs upload (Blob)
412
- let imageUri;
412
+ let imageUris;
413
413
  let fileUris;
414
414
  if (options.files && options.files.length > 0) {
415
415
  // Separate files that need uploading from those already uploaded
@@ -434,7 +434,7 @@ class Agent {
434
434
  const images = allFiles.filter((f) => f.content_type?.startsWith('image/'));
435
435
  const others = allFiles.filter((f) => !f.content_type?.startsWith('image/'));
436
436
  if (images.length > 0)
437
- imageUri = images[0].uri;
437
+ imageUris = images.map((f) => f.uri);
438
438
  if (others.length > 0)
439
439
  fileUris = others.map((f) => f.uri);
440
440
  }
@@ -442,13 +442,13 @@ class Agent {
442
442
  ? {
443
443
  chat_id: this.chatId,
444
444
  agent: this.config,
445
- input: { text, image: imageUri, files: fileUris, role: 'user', context: [], system_prompt: '', context_size: 0 },
445
+ input: { text, images: imageUris, files: fileUris, role: 'user', context: [], system_prompt: '', context_size: 0 },
446
446
  }
447
447
  : {
448
448
  chat_id: this.chatId,
449
449
  agent_config: this.config,
450
450
  agent_name: this.agentName,
451
- input: { text, image: imageUri, files: fileUris, role: 'user', context: [], system_prompt: '', context_size: 0 },
451
+ input: { text, images: imageUris, files: fileUris, role: 'user', context: [], system_prompt: '', context_size: 0 },
452
452
  };
453
453
  // For existing chats with callbacks: Start streaming BEFORE POST so we don't miss updates
454
454
  let streamPromise = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inferencesh/sdk",
3
- "version": "0.4.13",
3
+ "version": "0.4.15",
4
4
  "description": "Official JavaScript/TypeScript SDK for inference.sh - Run AI models with a simple API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",