@contentgrowth/llm-service 1.0.5 → 1.0.7

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/dist/index.cjs CHANGED
@@ -307,6 +307,17 @@ var BaseLLMProvider = class {
307
307
  async getVideoGenerationStatus(operationName) {
308
308
  throw new Error("Video generation not supported by this provider");
309
309
  }
310
+ /**
311
+ * Extract structured data from a file (Multimodal)
312
+ * @param {Buffer|string} fileData - File content (base64 or buffer)
313
+ * @param {string} mimeType - File mime type (e.g. 'application/pdf')
314
+ * @param {string} prompt - Extraction instructions
315
+ * @param {Object} schema - Optional JSON schema
316
+ * @param {Object} options - Options
317
+ */
318
+ async extractWithLLM(fileData, mimeType, prompt, schema, options) {
319
+ throw new Error("This provider does not support extractWithLLM (Multimodal extraction)");
320
+ }
310
321
  /**
311
322
  * Helper to get the last 6 digits of the API key for logging.
312
323
  * @returns {string} "..." + last 6 chars, or "not_set"
@@ -1361,9 +1372,10 @@ var LLMService = class {
1361
1372
  * @param {Buffer|string} fileData - File content (base64 or buffer)
1362
1373
  * @param {string} mimeType - File mime type (e.g. 'application/pdf')
1363
1374
  * @param {string} prompt - Extraction instructions
1364
- * @param {string} tenantId - Tenant ID
1365
- * @param {Object} schema - Optional JSON schema
1366
- * @param {Object} options - Options
1375
+ * @param {string|null} tenantId - Tenant ID
1376
+ * @param {Object|null} [schema] - Optional JSON schema
1377
+ * @param {Object} [options] - Options
1378
+ * @returns {Promise<any>} Extracted data
1367
1379
  */
1368
1380
  async extractWithLLM(fileData, mimeType, prompt, tenantId, schema = null, options = {}) {
1369
1381
  const provider = await this._getProvider(tenantId);