@contentgrowth/llm-service 1.4.2 → 1.4.3
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 +7 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1744,14 +1744,18 @@ var LLMService = class {
|
|
|
1744
1744
|
if (this.providerCache.has(cacheKey)) {
|
|
1745
1745
|
return this.providerCache.get(cacheKey);
|
|
1746
1746
|
}
|
|
1747
|
-
const
|
|
1748
|
-
if (
|
|
1747
|
+
const configOptions = {};
|
|
1748
|
+
if (this._ptalkTaskType) {
|
|
1749
|
+
configOptions.capability = this._ptalkTaskType;
|
|
1750
|
+
}
|
|
1751
|
+
const config = await ConfigManager.getConfig(tenantId, this.env, configOptions);
|
|
1752
|
+
if (!config.apiKey && config.provider !== "vertex" && config.provider !== "google") {
|
|
1749
1753
|
throw new LLMServiceException(`LLM service is not configured for ${config.provider}. Missing API Key.`, 500);
|
|
1750
1754
|
}
|
|
1751
1755
|
let provider;
|
|
1752
1756
|
if (config.provider === "openai") {
|
|
1753
1757
|
provider = new OpenAIProvider(config);
|
|
1754
|
-
} else if (config.provider === "gemini" || config.provider === "vertex") {
|
|
1758
|
+
} else if (config.provider === "gemini" || config.provider === "vertex" || config.provider === "google") {
|
|
1755
1759
|
provider = new GoogleProvider(config);
|
|
1756
1760
|
} else if (config.provider === "anthropic") {
|
|
1757
1761
|
provider = new AnthropicProvider(config);
|