@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.mjs
CHANGED
|
@@ -200,7 +200,7 @@ var ModelLattice = class extends BaseChatModel {
|
|
|
200
200
|
initChatModel(config) {
|
|
201
201
|
if (config.provider === "azure") {
|
|
202
202
|
return new AzureChatOpenAI({
|
|
203
|
-
azureOpenAIApiKey: process.env.AZURE_OPENAI_API_KEY,
|
|
203
|
+
azureOpenAIApiKey: config.apiKey || process.env.AZURE_OPENAI_API_KEY,
|
|
204
204
|
azureOpenAIApiInstanceName: "convertlab-westus",
|
|
205
205
|
azureOpenAIApiDeploymentName: config.model,
|
|
206
206
|
azureOpenAIApiVersion: "2024-02-01",
|
|
@@ -217,7 +217,7 @@ var ModelLattice = class extends BaseChatModel {
|
|
|
217
217
|
maxTokens: config.maxTokens,
|
|
218
218
|
timeout: config.timeout,
|
|
219
219
|
maxRetries: config.maxRetries || 2,
|
|
220
|
-
apiKey: process.env[config.apiKeyEnvName || "DEEPSEEK_API_KEY"],
|
|
220
|
+
apiKey: config.apiKey || process.env[config.apiKeyEnvName || "DEEPSEEK_API_KEY"],
|
|
221
221
|
streaming: config.streaming
|
|
222
222
|
});
|
|
223
223
|
} else if (config.provider === "siliconcloud") {
|
|
@@ -227,7 +227,7 @@ var ModelLattice = class extends BaseChatModel {
|
|
|
227
227
|
maxTokens: config.maxTokens,
|
|
228
228
|
timeout: config.timeout,
|
|
229
229
|
maxRetries: config.maxRetries || 2,
|
|
230
|
-
apiKey: process.env[config.apiKeyEnvName || "SILICONCLOUD_API_KEY"],
|
|
230
|
+
apiKey: config.apiKey || process.env[config.apiKeyEnvName || "SILICONCLOUD_API_KEY"],
|
|
231
231
|
configuration: {
|
|
232
232
|
baseURL: "https://api.siliconflow.cn/v1"
|
|
233
233
|
},
|
|
@@ -240,7 +240,7 @@ var ModelLattice = class extends BaseChatModel {
|
|
|
240
240
|
maxTokens: config.maxTokens,
|
|
241
241
|
timeout: config.timeout,
|
|
242
242
|
maxRetries: config.maxRetries || 2,
|
|
243
|
-
apiKey: process.env[config.apiKeyEnvName || "VOLCENGINE_API_KEY"],
|
|
243
|
+
apiKey: config.apiKey || process.env[config.apiKeyEnvName || "VOLCENGINE_API_KEY"],
|
|
244
244
|
configuration: {
|
|
245
245
|
baseURL: "https://ark.cn-beijing.volces.com/api/v3"
|
|
246
246
|
},
|
|
@@ -254,7 +254,7 @@ var ModelLattice = class extends BaseChatModel {
|
|
|
254
254
|
timeout: config.timeout,
|
|
255
255
|
maxRetries: config.maxRetries || 2,
|
|
256
256
|
streaming: config.streaming,
|
|
257
|
-
apiKey: process.env[config.apiKeyEnvName || "OPENAI_API_KEY"],
|
|
257
|
+
apiKey: config.apiKey || process.env[config.apiKeyEnvName || "OPENAI_API_KEY"],
|
|
258
258
|
configuration: {
|
|
259
259
|
baseURL: config.baseURL
|
|
260
260
|
}
|