New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@langchain/openai

Package Overview
Dependencies
Maintainers
0
Versions
79
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.3.15 to 0.3.16

21

dist/chat_models.js

@@ -71,9 +71,11 @@ import { OpenAI as OpenAIClient } from "openai";

}
let response_metadata;
if (rawResponse.system_fingerprint) {
response_metadata = {
usage: { ...rawResponse.usage },
system_fingerprint: rawResponse.system_fingerprint,
};
}
const response_metadata = {
model_name: rawResponse.model,
...(rawResponse.system_fingerprint
? {
usage: { ...rawResponse.usage },
system_fingerprint: rawResponse.system_fingerprint,
}
: {}),
};
if (message.audio) {

@@ -1276,2 +1278,3 @@ additional_kwargs.audio = message.audio;

generationInfo.system_fingerprint = data.system_fingerprint;
generationInfo.model_name = data.model;
}

@@ -1456,5 +1459,3 @@ if (this.logprobs) {

// Doing this ensures all fields on the message are serialized
generation.message = new AIMessage({
...generation.message,
});
generation.message = new AIMessage(Object.fromEntries(Object.entries(generation.message).filter(([key]) => !key.startsWith("lc_"))));
generations.push(generation);

@@ -1461,0 +1462,0 @@ }

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

@@ -5,0 +5,0 @@ "type": "module",

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