@saltcorn/large-language-model 1.0.6 → 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/generate.js +4 -2
- package/package.json +1 -1
package/generate.js
CHANGED
|
@@ -429,7 +429,9 @@ const getAiSdkModel = ({ config, alt_config, userCfg }, isEmbedding) => {
|
|
|
429
429
|
? config.alt_aisdk_configs?.find?.((acfg) => acfg.name === alt_config) ||
|
|
430
430
|
config
|
|
431
431
|
: config;
|
|
432
|
-
|
|
432
|
+
|
|
433
|
+
const use_provider = use_config.alt_provider || use_config.provider;
|
|
434
|
+
|
|
433
435
|
const model_name = isEmbedding
|
|
434
436
|
? userCfg.embed_model ||
|
|
435
437
|
userCfg.model ||
|
|
@@ -455,7 +457,7 @@ const getAiSdkModel = ({ config, alt_config, userCfg }, isEmbedding) => {
|
|
|
455
457
|
});
|
|
456
458
|
return anthropic(model_name);
|
|
457
459
|
default:
|
|
458
|
-
throw new Error("Provider not found: " +
|
|
460
|
+
throw new Error("Provider not found: " + use_provider);
|
|
459
461
|
}
|
|
460
462
|
};
|
|
461
463
|
|