@saltcorn/large-language-model 1.0.7 → 1.0.8
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 -1
- package/package.json +1 -1
- package/tests/llm.test.js +1 -1
package/generate.js
CHANGED
|
@@ -442,7 +442,10 @@ const getAiSdkModel = ({ config, alt_config, userCfg }, isEmbedding) => {
|
|
|
442
442
|
switch (use_provider) {
|
|
443
443
|
case "OpenAI":
|
|
444
444
|
const use_api_key =
|
|
445
|
-
userCfg.api_key ||
|
|
445
|
+
userCfg.api_key ||
|
|
446
|
+
userCfg.apiKey ||
|
|
447
|
+
use_config.api_key ||
|
|
448
|
+
use_config.apiKey;
|
|
446
449
|
const openai = createOpenAI({ apiKey: use_api_key });
|
|
447
450
|
return isEmbedding
|
|
448
451
|
? openai.textEmbeddingModel(model_name)
|
package/package.json
CHANGED
package/tests/llm.test.js
CHANGED