@langchain/openai 0.5.6 → 0.5.8
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/chat_models.cjs +326 -27
- package/dist/chat_models.d.ts +61 -3
- package/dist/chat_models.js +327 -28
- package/dist/tools/dalle.cjs +13 -10
- package/dist/tools/dalle.js +13 -10
- package/dist/types.d.ts +29 -0
- package/package.json +3 -3
package/dist/types.d.ts
CHANGED
|
@@ -135,8 +135,24 @@ export interface OpenAIChatInput extends OpenAIBaseInput {
|
|
|
135
135
|
/**
|
|
136
136
|
* Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high.
|
|
137
137
|
* Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
138
|
+
*
|
|
139
|
+
* @deprecated Use the {@link reasoning} object instead.
|
|
138
140
|
*/
|
|
139
141
|
reasoningEffort?: OpenAIClient.Chat.ChatCompletionReasoningEffort;
|
|
142
|
+
/**
|
|
143
|
+
* Options for reasoning models.
|
|
144
|
+
*
|
|
145
|
+
* Note that some options, like reasoning summaries, are only available when using the responses
|
|
146
|
+
* API. This option is ignored when not using a reasoning model.
|
|
147
|
+
*/
|
|
148
|
+
reasoning?: OpenAIClient.Reasoning;
|
|
149
|
+
/**
|
|
150
|
+
* Should be set to `true` in tenancies with Zero Data Retention
|
|
151
|
+
* @see https://platform.openai.com/docs/guides/your-data
|
|
152
|
+
*
|
|
153
|
+
* @default false
|
|
154
|
+
*/
|
|
155
|
+
zdrEnabled?: boolean;
|
|
140
156
|
}
|
|
141
157
|
export declare interface AzureOpenAIInput {
|
|
142
158
|
/**
|
|
@@ -205,4 +221,17 @@ type ChatOpenAIResponseFormatJSONSchema = Omit<ResponseFormatJSONSchema, "json_s
|
|
|
205
221
|
schema: Record<string, any> | z.ZodObject<any, any, any, any>;
|
|
206
222
|
};
|
|
207
223
|
};
|
|
224
|
+
/**
|
|
225
|
+
* The summary of a model's reasoning step.
|
|
226
|
+
*/
|
|
227
|
+
export type ChatOpenAIReasoningSummary = Omit<OpenAIClient.Responses.ResponseReasoningItem, "summary"> & {
|
|
228
|
+
/**
|
|
229
|
+
* The summary of the reasoning step. The index field will be populated if the response was
|
|
230
|
+
* streamed. This allows LangChain to recompose the reasoning summary output correctly when the
|
|
231
|
+
* AIMessage is used as an input for future generation requests.
|
|
232
|
+
*/
|
|
233
|
+
summary: Array<OpenAIClient.Responses.ResponseReasoningItem.Summary & {
|
|
234
|
+
index?: number;
|
|
235
|
+
}>;
|
|
236
|
+
};
|
|
208
237
|
export type ChatOpenAIResponseFormat = ResponseFormatText | ResponseFormatJSONObject | ChatOpenAIResponseFormatJSONSchema;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langchain/openai",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.8",
|
|
4
4
|
"description": "OpenAI integrations for LangChain.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
"license": "MIT",
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"js-tiktoken": "^1.0.12",
|
|
39
|
-
"openai": "^4.
|
|
39
|
+
"openai": "^4.96.0",
|
|
40
40
|
"zod": "^3.22.4",
|
|
41
41
|
"zod-to-json-schema": "^3.22.3"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@langchain/core": ">=0.3.
|
|
44
|
+
"@langchain/core": ">=0.3.48 <0.4.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@azure/identity": "^4.2.1",
|