Socket
Socket
Sign inDemoInstall

@langchain/openai

Package Overview
Dependencies
Maintainers
7
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@langchain/openai - npm Package Compare versions

Comparing version 0.0.33 to 0.0.34

10

dist/azure/chat_models.js

@@ -18,5 +18,9 @@ import { AzureOpenAI as AzureOpenAIClient } from "openai";

if (newFields) {
newFields.azureOpenAIApiDeploymentName = newFields.deploymentName;
newFields.azureOpenAIApiKey = newFields.openAIApiKey;
newFields.azureOpenAIApiVersion = newFields.openAIApiVersion;
// don't rewrite the fields if they are already set
newFields.azureOpenAIApiDeploymentName =
newFields.azureOpenAIApiDeploymentName ?? newFields.deploymentName;
newFields.azureOpenAIApiKey =
newFields.azureOpenAIApiKey ?? newFields.openAIApiKey;
newFields.azureOpenAIApiVersion =
newFields.azureOpenAIApiVersion ?? newFields.openAIApiVersion;
}

@@ -23,0 +27,0 @@ super(newFields);

@@ -9,5 +9,9 @@ import { AzureOpenAI as AzureOpenAIClient, } from "openai";

if (Object.entries(newFields).length) {
newFields.azureOpenAIApiDeploymentName = newFields.deploymentName;
newFields.azureOpenAIApiKey = newFields.apiKey;
newFields.azureOpenAIApiVersion = newFields.openAIApiVersion;
// don't rewrite the fields if they are already set
newFields.azureOpenAIApiDeploymentName =
newFields.azureOpenAIApiDeploymentName ?? newFields.deploymentName;
newFields.azureOpenAIApiKey =
newFields.azureOpenAIApiKey ?? newFields.apiKey;
newFields.azureOpenAIApiVersion =
newFields.azureOpenAIApiVersion ?? newFields.openAIApiVersion;
}

@@ -14,0 +18,0 @@ super(newFields, configuration);

@@ -15,5 +15,9 @@ import { AzureOpenAI as AzureOpenAIClient } from "openai";

if (newFields) {
newFields.azureOpenAIApiDeploymentName = newFields.deploymentName;
newFields.azureOpenAIApiKey = newFields.openAIApiKey;
newFields.azureOpenAIApiVersion = newFields.openAIApiVersion;
// don't rewrite the fields if they are already set
newFields.azureOpenAIApiDeploymentName =
newFields.azureOpenAIApiDeploymentName ?? newFields.deploymentName;
newFields.azureOpenAIApiKey =
newFields.azureOpenAIApiKey ?? newFields.openAIApiKey;
newFields.azureOpenAIApiVersion =
newFields.azureOpenAIApiVersion ?? newFields.openAIApiVersion;
}

@@ -20,0 +24,0 @@ super(newFields);

@@ -25,3 +25,3 @@ /**

const { azureOpenAIApiDeploymentName, azureOpenAIApiInstanceName, azureOpenAIApiKey, azureOpenAIBasePath, baseURL, azureADTokenProvider, } = config;
if (azureOpenAIApiKey &&
if ((azureOpenAIApiKey || azureADTokenProvider) &&
azureOpenAIBasePath &&

@@ -28,0 +28,0 @@ azureOpenAIApiDeploymentName) {

{
"name": "@langchain/openai",
"version": "0.0.33",
"version": "0.0.34",
"description": "OpenAI integrations for LangChain.js",

@@ -17,3 +17,4 @@ "type": "module",

"scripts": {
"build": "yarn run build:deps && yarn clean && yarn build:esm && yarn build:cjs && yarn build:scripts",
"build": "yarn turbo:command build:internal --filter=@langchain/openai",
"build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking",
"build:deps": "yarn run turbo:command build --filter=@langchain/core",

@@ -28,3 +29,3 @@ "build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/",

"lint:fix": "yarn lint:eslint --fix && yarn lint:dpdm",
"clean": "rimraf .turbo/ dist/ && NODE_OPTIONS=--max-old-space-size=4096 yarn lc-build --config ./langchain.config.js --create-entrypoints --pre",
"clean": "rm -rf .turbo dist/",
"prepack": "yarn build",

@@ -53,3 +54,3 @@ "test": "yarn run build:deps && NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50%",

"@jest/globals": "^29.5.0",
"@langchain/scripts": "~0.0",
"@langchain/scripts": "~0.0.14",
"@swc/core": "^1.3.90",

@@ -56,0 +57,0 @@ "@swc/jest": "^0.2.29",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc