@langchain/openai 0.3.11 → 0.3.12
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 +3 -0
- package/dist/chat_models.d.ts +5 -0
- package/dist/chat_models.js +3 -0
- package/package.json +2 -2
package/dist/chat_models.cjs
CHANGED
|
@@ -1197,6 +1197,9 @@ class ChatOpenAI extends chat_models_1.BaseChatModel {
|
|
|
1197
1197
|
: {}),
|
|
1198
1198
|
...this.modelKwargs,
|
|
1199
1199
|
};
|
|
1200
|
+
if (options?.prediction !== undefined) {
|
|
1201
|
+
params.prediction = options.prediction;
|
|
1202
|
+
}
|
|
1200
1203
|
return params;
|
|
1201
1204
|
}
|
|
1202
1205
|
/** @ignore */
|
package/dist/chat_models.d.ts
CHANGED
|
@@ -95,6 +95,11 @@ export interface ChatOpenAICallOptions extends OpenAICallOptions, BaseFunctionCa
|
|
|
95
95
|
* [Learn more](https://platform.openai.com/docs/guides/audio).
|
|
96
96
|
*/
|
|
97
97
|
audio?: OpenAIClient.Chat.ChatCompletionAudioParam;
|
|
98
|
+
/**
|
|
99
|
+
* Static predicted output content, such as the content of a text file that is being regenerated.
|
|
100
|
+
* [Learn more](https://platform.openai.com/docs/guides/latency-optimization#use-predicted-outputs).
|
|
101
|
+
*/
|
|
102
|
+
prediction?: OpenAIClient.ChatCompletionPredictionContent;
|
|
98
103
|
}
|
|
99
104
|
export interface ChatOpenAIFields extends Partial<OpenAIChatInput>, Partial<AzureOpenAIInput>, BaseChatModelParams {
|
|
100
105
|
configuration?: ClientOptions & LegacyOpenAIInput;
|
package/dist/chat_models.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langchain/openai",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.12",
|
|
4
4
|
"description": "OpenAI integrations for LangChain.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"license": "MIT",
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"js-tiktoken": "^1.0.12",
|
|
39
|
-
"openai": "^4.
|
|
39
|
+
"openai": "^4.71.0",
|
|
40
40
|
"zod": "^3.22.4",
|
|
41
41
|
"zod-to-json-schema": "^3.22.3"
|
|
42
42
|
},
|