@contentgrowth/llm-service 1.4.1 → 1.4.2
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 +5 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +5 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -360,11 +360,14 @@ declare class LLMService {
|
|
|
360
360
|
getVideoGenerationStatus(operationName: any, tenantId: any): Promise<any>;
|
|
361
361
|
/**
|
|
362
362
|
* Generate an image
|
|
363
|
-
*
|
|
363
|
+
*
|
|
364
|
+
* Note: The caller (backend) is responsible for capability checks and routing.
|
|
365
|
+
* This method simply delegates to the configured provider.
|
|
366
|
+
*
|
|
364
367
|
* @param {string} prompt - Text description of the image
|
|
365
368
|
* @param {string} tenantId - Tenant identifier
|
|
366
369
|
* @param {string} systemPrompt - System instructions for generation
|
|
367
|
-
* @param {Object} options - Generation options (aspectRatio, images, etc.)
|
|
370
|
+
* @param {Object} options - Generation options (aspectRatio, images, model, etc.)
|
|
368
371
|
*/
|
|
369
372
|
imageGeneration(prompt: string, tenantId: string, systemPrompt: string, options?: any): Promise<any>;
|
|
370
373
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -360,11 +360,14 @@ declare class LLMService {
|
|
|
360
360
|
getVideoGenerationStatus(operationName: any, tenantId: any): Promise<any>;
|
|
361
361
|
/**
|
|
362
362
|
* Generate an image
|
|
363
|
-
*
|
|
363
|
+
*
|
|
364
|
+
* Note: The caller (backend) is responsible for capability checks and routing.
|
|
365
|
+
* This method simply delegates to the configured provider.
|
|
366
|
+
*
|
|
364
367
|
* @param {string} prompt - Text description of the image
|
|
365
368
|
* @param {string} tenantId - Tenant identifier
|
|
366
369
|
* @param {string} systemPrompt - System instructions for generation
|
|
367
|
-
* @param {Object} options - Generation options (aspectRatio, images, etc.)
|
|
370
|
+
* @param {Object} options - Generation options (aspectRatio, images, model, etc.)
|
|
368
371
|
*/
|
|
369
372
|
imageGeneration(prompt: string, tenantId: string, systemPrompt: string, options?: any): Promise<any>;
|
|
370
373
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1877,21 +1877,16 @@ var LLMService = class {
|
|
|
1877
1877
|
}
|
|
1878
1878
|
/**
|
|
1879
1879
|
* Generate an image
|
|
1880
|
-
*
|
|
1880
|
+
*
|
|
1881
|
+
* Note: The caller (backend) is responsible for capability checks and routing.
|
|
1882
|
+
* This method simply delegates to the configured provider.
|
|
1883
|
+
*
|
|
1881
1884
|
* @param {string} prompt - Text description of the image
|
|
1882
1885
|
* @param {string} tenantId - Tenant identifier
|
|
1883
1886
|
* @param {string} systemPrompt - System instructions for generation
|
|
1884
|
-
* @param {Object} options - Generation options (aspectRatio, images, etc.)
|
|
1887
|
+
* @param {Object} options - Generation options (aspectRatio, images, model, etc.)
|
|
1885
1888
|
*/
|
|
1886
1889
|
async imageGeneration(prompt, tenantId, systemPrompt, options = {}) {
|
|
1887
|
-
var _a;
|
|
1888
|
-
if (tenantId) {
|
|
1889
|
-
const config = await ConfigManager.getConfig(tenantId, this.env);
|
|
1890
|
-
if (config.isTenantOwned && !((_a = config.capabilities) == null ? void 0 : _a.image)) {
|
|
1891
|
-
console.log(`[LLMService] Tenant ${tenantId} BYOK doesn't have image capability. Using system keys.`);
|
|
1892
|
-
tenantId = null;
|
|
1893
|
-
}
|
|
1894
|
-
}
|
|
1895
1890
|
const provider = await this._getProvider(tenantId);
|
|
1896
1891
|
return provider.imageGeneration(prompt, systemPrompt, options);
|
|
1897
1892
|
}
|