@langchain/openai 0.2.8 → 0.2.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.
@@ -899,6 +899,7 @@ class ChatOpenAI extends chat_models_1.BaseChatModel {
899
899
  this.openAIApiKey =
900
900
  fields?.apiKey ??
901
901
  fields?.openAIApiKey ??
902
+ fields?.configuration?.apiKey ??
902
903
  (0, env_1.getEnvironmentVariable)("OPENAI_API_KEY");
903
904
  this.apiKey = this.openAIApiKey;
904
905
  this.azureOpenAIApiKey =
@@ -895,6 +895,7 @@ export class ChatOpenAI extends BaseChatModel {
895
895
  this.openAIApiKey =
896
896
  fields?.apiKey ??
897
897
  fields?.openAIApiKey ??
898
+ fields?.configuration?.apiKey ??
898
899
  getEnvironmentVariable("OPENAI_API_KEY");
899
900
  this.apiKey = this.openAIApiKey;
900
901
  this.azureOpenAIApiKey =
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/openai",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "description": "OpenAI integrations for LangChain.js",
5
5
  "type": "module",
6
6
  "engines": {