🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

@langchain/openai

Package Overview
Dependencies
Maintainers
11
Versions
99
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

to
0.5.6

7

dist/azure/embeddings.js

@@ -116,3 +116,8 @@ import { AzureOpenAI as AzureOpenAIClient, } from "openai";

try {
const res = await this.client.embeddings.create(request, requestOptions);
const res = await this.client.embeddings.create(request,
// This unknown cast is required because OpenAI types seem to be incorrect here
// without it, we can't pass arbitrary keys via the `query` field in the options,
// which means we can't specify the `api-version` as required by Azure OpenAI.
// See https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#rest-api-versioning
requestOptions);
return res;

@@ -119,0 +124,0 @@ }

14

dist/types.d.ts
import type { OpenAI as OpenAIClient } from "openai";
import type { RequestOptions as _OpenAICoreRequestOptions } from "openai/core";
import type { ResponseFormatText, ResponseFormatJSONObject, ResponseFormatJSONSchema } from "openai/resources/shared";

@@ -76,14 +77,3 @@ import { TiktokenModel } from "js-tiktoken/lite";

}
export type OpenAICoreRequestOptions<Req extends object = Record<string, unknown>> = {
path?: string;
query?: Req | undefined;
body?: Req | undefined;
headers?: Record<string, string | null | undefined> | undefined;
maxRetries?: number;
stream?: boolean | undefined;
timeout?: number;
httpAgent?: any;
signal?: AbortSignal | undefined | null;
idempotencyKey?: string;
};
export type OpenAICoreRequestOptions<Req = Record<string, unknown>> = _OpenAICoreRequestOptions<Req>;
export interface OpenAICallOptions extends BaseLanguageModelCallOptions {

@@ -90,0 +80,0 @@ /**

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

@@ -39,3 +39,3 @@ "type": "module",

"js-tiktoken": "^1.0.12",
"openai": "^4.87.3",
"openai": "^4.93.0",
"zod": "^3.22.4",

@@ -66,3 +66,3 @@ "zod-to-json-schema": "^3.22.3"

"prettier": "^2.8.3",
"release-it": "^17.6.0",
"release-it": "^18.1.2",
"rimraf": "^5.0.1",

@@ -69,0 +69,0 @@ "ts-jest": "^29.1.0",

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 too big to display