@axiom-lattice/core 2.1.8 → 2.1.9
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.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -276,7 +276,7 @@ var ModelLattice = class extends import_chat_models.BaseChatModel {
|
|
|
276
276
|
initChatModel(config) {
|
|
277
277
|
if (config.provider === "azure") {
|
|
278
278
|
return new import_openai.AzureChatOpenAI({
|
|
279
|
-
azureOpenAIApiKey: process.env.AZURE_OPENAI_API_KEY,
|
|
279
|
+
azureOpenAIApiKey: config.apiKey || process.env.AZURE_OPENAI_API_KEY,
|
|
280
280
|
azureOpenAIApiInstanceName: "convertlab-westus",
|
|
281
281
|
azureOpenAIApiDeploymentName: config.model,
|
|
282
282
|
azureOpenAIApiVersion: "2024-02-01",
|
|
@@ -293,7 +293,7 @@ var ModelLattice = class extends import_chat_models.BaseChatModel {
|
|
|
293
293
|
maxTokens: config.maxTokens,
|
|
294
294
|
timeout: config.timeout,
|
|
295
295
|
maxRetries: config.maxRetries || 2,
|
|
296
|
-
apiKey: process.env[config.apiKeyEnvName || "DEEPSEEK_API_KEY"],
|
|
296
|
+
apiKey: config.apiKey || process.env[config.apiKeyEnvName || "DEEPSEEK_API_KEY"],
|
|
297
297
|
streaming: config.streaming
|
|
298
298
|
});
|
|
299
299
|
} else if (config.provider === "siliconcloud") {
|
|
@@ -303,7 +303,7 @@ var ModelLattice = class extends import_chat_models.BaseChatModel {
|
|
|
303
303
|
maxTokens: config.maxTokens,
|
|
304
304
|
timeout: config.timeout,
|
|
305
305
|
maxRetries: config.maxRetries || 2,
|
|
306
|
-
apiKey: process.env[config.apiKeyEnvName || "SILICONCLOUD_API_KEY"],
|
|
306
|
+
apiKey: config.apiKey || process.env[config.apiKeyEnvName || "SILICONCLOUD_API_KEY"],
|
|
307
307
|
configuration: {
|
|
308
308
|
baseURL: "https://api.siliconflow.cn/v1"
|
|
309
309
|
},
|
|
@@ -316,7 +316,7 @@ var ModelLattice = class extends import_chat_models.BaseChatModel {
|
|
|
316
316
|
maxTokens: config.maxTokens,
|
|
317
317
|
timeout: config.timeout,
|
|
318
318
|
maxRetries: config.maxRetries || 2,
|
|
319
|
-
apiKey: process.env[config.apiKeyEnvName || "VOLCENGINE_API_KEY"],
|
|
319
|
+
apiKey: config.apiKey || process.env[config.apiKeyEnvName || "VOLCENGINE_API_KEY"],
|
|
320
320
|
configuration: {
|
|
321
321
|
baseURL: "https://ark.cn-beijing.volces.com/api/v3"
|
|
322
322
|
},
|
|
@@ -330,7 +330,7 @@ var ModelLattice = class extends import_chat_models.BaseChatModel {
|
|
|
330
330
|
timeout: config.timeout,
|
|
331
331
|
maxRetries: config.maxRetries || 2,
|
|
332
332
|
streaming: config.streaming,
|
|
333
|
-
apiKey: process.env[config.apiKeyEnvName || "OPENAI_API_KEY"],
|
|
333
|
+
apiKey: config.apiKey || process.env[config.apiKeyEnvName || "OPENAI_API_KEY"],
|
|
334
334
|
configuration: {
|
|
335
335
|
baseURL: config.baseURL
|
|
336
336
|
}
|