@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.cjs
CHANGED
|
@@ -1931,21 +1931,16 @@ var LLMService = class {
|
|
|
1931
1931
|
}
|
|
1932
1932
|
/**
|
|
1933
1933
|
* Generate an image
|
|
1934
|
-
*
|
|
1934
|
+
*
|
|
1935
|
+
* Note: The caller (backend) is responsible for capability checks and routing.
|
|
1936
|
+
* This method simply delegates to the configured provider.
|
|
1937
|
+
*
|
|
1935
1938
|
* @param {string} prompt - Text description of the image
|
|
1936
1939
|
* @param {string} tenantId - Tenant identifier
|
|
1937
1940
|
* @param {string} systemPrompt - System instructions for generation
|
|
1938
|
-
* @param {Object} options - Generation options (aspectRatio, images, etc.)
|
|
1941
|
+
* @param {Object} options - Generation options (aspectRatio, images, model, etc.)
|
|
1939
1942
|
*/
|
|
1940
1943
|
async imageGeneration(prompt, tenantId, systemPrompt, options = {}) {
|
|
1941
|
-
var _a;
|
|
1942
|
-
if (tenantId) {
|
|
1943
|
-
const config = await ConfigManager.getConfig(tenantId, this.env);
|
|
1944
|
-
if (config.isTenantOwned && !((_a = config.capabilities) == null ? void 0 : _a.image)) {
|
|
1945
|
-
console.log(`[LLMService] Tenant ${tenantId} BYOK doesn't have image capability. Using system keys.`);
|
|
1946
|
-
tenantId = null;
|
|
1947
|
-
}
|
|
1948
|
-
}
|
|
1949
1944
|
const provider = await this._getProvider(tenantId);
|
|
1950
1945
|
return provider.imageGeneration(prompt, systemPrompt, options);
|
|
1951
1946
|
}
|