@langchain/openai 1.6.2 → 1.7.0

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.
Files changed (175) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/azure/chat_models/common.d.cts +1 -2
  3. package/dist/azure/chat_models/common.d.cts.map +1 -1
  4. package/dist/azure/chat_models/common.d.ts +1 -2
  5. package/dist/azure/chat_models/common.d.ts.map +1 -1
  6. package/dist/azure/chat_models/completions.d.cts +1 -2
  7. package/dist/azure/chat_models/completions.d.cts.map +1 -1
  8. package/dist/azure/chat_models/completions.d.ts +1 -2
  9. package/dist/azure/chat_models/completions.d.ts.map +1 -1
  10. package/dist/azure/chat_models/index.cjs +5 -0
  11. package/dist/azure/chat_models/index.cjs.map +1 -1
  12. package/dist/azure/chat_models/index.d.cts +3 -2
  13. package/dist/azure/chat_models/index.d.cts.map +1 -1
  14. package/dist/azure/chat_models/index.d.ts +3 -2
  15. package/dist/azure/chat_models/index.d.ts.map +1 -1
  16. package/dist/azure/chat_models/index.js +5 -0
  17. package/dist/azure/chat_models/index.js.map +1 -1
  18. package/dist/azure/chat_models/responses.cjs +5 -0
  19. package/dist/azure/chat_models/responses.cjs.map +1 -1
  20. package/dist/azure/chat_models/responses.d.cts +3 -2
  21. package/dist/azure/chat_models/responses.d.cts.map +1 -1
  22. package/dist/azure/chat_models/responses.d.ts +3 -2
  23. package/dist/azure/chat_models/responses.d.ts.map +1 -1
  24. package/dist/azure/chat_models/responses.js +5 -0
  25. package/dist/azure/chat_models/responses.js.map +1 -1
  26. package/dist/azure/embeddings.d.cts +1 -2
  27. package/dist/azure/embeddings.d.cts.map +1 -1
  28. package/dist/azure/embeddings.d.ts +1 -2
  29. package/dist/azure/embeddings.d.ts.map +1 -1
  30. package/dist/azure/llms.d.cts +1 -2
  31. package/dist/azure/llms.d.cts.map +1 -1
  32. package/dist/azure/llms.d.ts.map +1 -1
  33. package/dist/chat_models/base.cjs +1 -1
  34. package/dist/chat_models/base.d.cts +4 -4
  35. package/dist/chat_models/base.d.cts.map +1 -1
  36. package/dist/chat_models/base.d.ts +4 -4
  37. package/dist/chat_models/base.d.ts.map +1 -1
  38. package/dist/chat_models/base.js +1 -1
  39. package/dist/chat_models/completions.cjs +2 -2
  40. package/dist/chat_models/completions.cjs.map +1 -1
  41. package/dist/chat_models/completions.d.cts +2 -3
  42. package/dist/chat_models/completions.d.cts.map +1 -1
  43. package/dist/chat_models/completions.d.ts +2 -3
  44. package/dist/chat_models/completions.d.ts.map +1 -1
  45. package/dist/chat_models/completions.js +2 -2
  46. package/dist/chat_models/completions.js.map +1 -1
  47. package/dist/chat_models/index.cjs +2 -2
  48. package/dist/chat_models/index.cjs.map +1 -1
  49. package/dist/chat_models/index.d.cts +4 -4
  50. package/dist/chat_models/index.d.cts.map +1 -1
  51. package/dist/chat_models/index.d.ts +4 -4
  52. package/dist/chat_models/index.d.ts.map +1 -1
  53. package/dist/chat_models/index.js +2 -2
  54. package/dist/chat_models/index.js.map +1 -1
  55. package/dist/chat_models/profiles.cjs +350 -193
  56. package/dist/chat_models/profiles.cjs.map +1 -1
  57. package/dist/chat_models/profiles.js +350 -193
  58. package/dist/chat_models/profiles.js.map +1 -1
  59. package/dist/chat_models/responses.cjs +2 -2
  60. package/dist/chat_models/responses.cjs.map +1 -1
  61. package/dist/chat_models/responses.d.cts +3 -4
  62. package/dist/chat_models/responses.d.cts.map +1 -1
  63. package/dist/chat_models/responses.d.ts +3 -4
  64. package/dist/chat_models/responses.d.ts.map +1 -1
  65. package/dist/chat_models/responses.js +2 -2
  66. package/dist/chat_models/responses.js.map +1 -1
  67. package/dist/converters/completions.d.cts +6 -7
  68. package/dist/converters/completions.d.cts.map +1 -1
  69. package/dist/converters/completions.d.ts +6 -7
  70. package/dist/converters/completions.d.ts.map +1 -1
  71. package/dist/converters/responses.d.cts +11 -12
  72. package/dist/converters/responses.d.cts.map +1 -1
  73. package/dist/converters/responses.d.ts +11 -12
  74. package/dist/converters/responses.d.ts.map +1 -1
  75. package/dist/embeddings.d.cts +3 -4
  76. package/dist/embeddings.d.cts.map +1 -1
  77. package/dist/embeddings.d.ts +3 -4
  78. package/dist/embeddings.d.ts.map +1 -1
  79. package/dist/llms.cjs +1 -1
  80. package/dist/llms.d.cts.map +1 -1
  81. package/dist/llms.d.ts.map +1 -1
  82. package/dist/llms.js +1 -1
  83. package/dist/tools/applyPatch.d.cts +8 -9
  84. package/dist/tools/applyPatch.d.cts.map +1 -1
  85. package/dist/tools/applyPatch.d.ts +8 -9
  86. package/dist/tools/applyPatch.d.ts.map +1 -1
  87. package/dist/tools/codeInterpreter.d.cts +5 -6
  88. package/dist/tools/codeInterpreter.d.cts.map +1 -1
  89. package/dist/tools/codeInterpreter.d.ts +5 -6
  90. package/dist/tools/codeInterpreter.d.ts.map +1 -1
  91. package/dist/tools/computerUse.d.cts +17 -18
  92. package/dist/tools/computerUse.d.cts.map +1 -1
  93. package/dist/tools/computerUse.d.ts +17 -18
  94. package/dist/tools/computerUse.d.ts.map +1 -1
  95. package/dist/tools/custom.d.cts +2 -3
  96. package/dist/tools/custom.d.cts.map +1 -1
  97. package/dist/tools/custom.d.ts +2 -3
  98. package/dist/tools/custom.d.ts.map +1 -1
  99. package/dist/tools/dalle.d.cts +3 -4
  100. package/dist/tools/dalle.d.cts.map +1 -1
  101. package/dist/tools/dalle.d.ts +3 -4
  102. package/dist/tools/dalle.d.ts.map +1 -1
  103. package/dist/tools/fileSearch.d.cts +9 -10
  104. package/dist/tools/fileSearch.d.cts.map +1 -1
  105. package/dist/tools/fileSearch.d.ts +9 -10
  106. package/dist/tools/fileSearch.d.ts.map +1 -1
  107. package/dist/tools/imageGeneration.d.cts +4 -5
  108. package/dist/tools/imageGeneration.d.cts.map +1 -1
  109. package/dist/tools/imageGeneration.d.ts +4 -5
  110. package/dist/tools/imageGeneration.d.ts.map +1 -1
  111. package/dist/tools/index.d.cts +2 -2
  112. package/dist/tools/index.d.cts.map +1 -1
  113. package/dist/tools/index.d.ts +2 -2
  114. package/dist/tools/index.d.ts.map +1 -1
  115. package/dist/tools/localShell.d.cts +5 -6
  116. package/dist/tools/localShell.d.cts.map +1 -1
  117. package/dist/tools/localShell.d.ts +5 -6
  118. package/dist/tools/localShell.d.ts.map +1 -1
  119. package/dist/tools/mcp.d.cts +8 -9
  120. package/dist/tools/mcp.d.cts.map +1 -1
  121. package/dist/tools/mcp.d.ts +8 -9
  122. package/dist/tools/mcp.d.ts.map +1 -1
  123. package/dist/tools/shell.d.cts +8 -9
  124. package/dist/tools/shell.d.cts.map +1 -1
  125. package/dist/tools/shell.d.ts +8 -9
  126. package/dist/tools/shell.d.ts.map +1 -1
  127. package/dist/tools/toolSearch.d.cts +3 -4
  128. package/dist/tools/toolSearch.d.cts.map +1 -1
  129. package/dist/tools/toolSearch.d.ts +3 -4
  130. package/dist/tools/toolSearch.d.ts.map +1 -1
  131. package/dist/tools/webSearch.d.cts +5 -6
  132. package/dist/tools/webSearch.d.cts.map +1 -1
  133. package/dist/tools/webSearch.d.ts +5 -6
  134. package/dist/tools/webSearch.d.ts.map +1 -1
  135. package/dist/types.d.cts +16 -16
  136. package/dist/types.d.cts.map +1 -1
  137. package/dist/types.d.ts +16 -16
  138. package/dist/types.d.ts.map +1 -1
  139. package/dist/utils/azure.d.cts +7 -8
  140. package/dist/utils/azure.d.cts.map +1 -1
  141. package/dist/utils/azure.d.ts +7 -8
  142. package/dist/utils/azure.d.ts.map +1 -1
  143. package/dist/utils/client.d.cts +1 -2
  144. package/dist/utils/client.d.cts.map +1 -1
  145. package/dist/utils/client.d.ts +1 -2
  146. package/dist/utils/client.d.ts.map +1 -1
  147. package/dist/utils/misc.d.cts +1 -2
  148. package/dist/utils/misc.d.cts.map +1 -1
  149. package/dist/utils/misc.d.ts +1 -2
  150. package/dist/utils/misc.d.ts.map +1 -1
  151. package/dist/utils/profile.cjs +27 -0
  152. package/dist/utils/profile.cjs.map +1 -0
  153. package/dist/utils/profile.js +27 -0
  154. package/dist/utils/profile.js.map +1 -0
  155. package/dist/utils/prompts.d.cts +1 -2
  156. package/dist/utils/prompts.d.cts.map +1 -1
  157. package/dist/utils/prompts.d.ts +1 -2
  158. package/dist/utils/prompts.d.ts.map +1 -1
  159. package/dist/utils/responses_stream_events.cjs +25 -34
  160. package/dist/utils/responses_stream_events.cjs.map +1 -1
  161. package/dist/utils/responses_stream_events.d.cts +2 -3
  162. package/dist/utils/responses_stream_events.d.cts.map +1 -1
  163. package/dist/utils/responses_stream_events.d.ts +2 -3
  164. package/dist/utils/responses_stream_events.d.ts.map +1 -1
  165. package/dist/utils/responses_stream_events.js +25 -34
  166. package/dist/utils/responses_stream_events.js.map +1 -1
  167. package/dist/utils/tools.d.cts +4 -5
  168. package/dist/utils/tools.d.cts.map +1 -1
  169. package/dist/utils/tools.d.ts +4 -5
  170. package/dist/utils/tools.d.ts.map +1 -1
  171. package/package.json +9 -9
  172. package/dist/utils/file_mime_types.cjs +0 -15
  173. package/dist/utils/file_mime_types.cjs.map +0 -1
  174. package/dist/utils/file_mime_types.js +0 -15
  175. package/dist/utils/file_mime_types.js.map +0 -1
@@ -6,7 +6,7 @@ import { ChatCompletionContentPart, ChatCompletionContentPartImage, ChatCompleti
6
6
  /**
7
7
  * @deprecated This converter is an internal detail of the OpenAI provider. Do not use it directly. This will be revisited in a future release.
8
8
  */
9
- declare const completionsApiContentBlockConverter: StandardContentBlockConverter<{
9
+ export declare const completionsApiContentBlockConverter: StandardContentBlockConverter<{
10
10
  text: ChatCompletionContentPartText;
11
11
  image: ChatCompletionContentPartImage;
12
12
  audio: ChatCompletionContentPartInputAudio;
@@ -68,7 +68,7 @@ declare const completionsApiContentBlockConverter: StandardContentBlockConverter
68
68
  * the `invalid_tool_calls` array rather than throwing an error
69
69
  *
70
70
  */
71
- declare const convertCompletionsMessageToBaseMessage: Converter<{
71
+ export declare const convertCompletionsMessageToBaseMessage: Converter<{
72
72
  message: OpenAI.Chat.Completions.ChatCompletionMessage;
73
73
  rawResponse: OpenAI.Chat.Completions.ChatCompletion;
74
74
  includeRawResponse?: boolean;
@@ -132,7 +132,7 @@ declare const convertCompletionsMessageToBaseMessage: Converter<{
132
132
  * - Response metadata includes model provider info and usage statistics
133
133
  * - Function calls and tool calls are stored in additional_kwargs for compatibility
134
134
  */
135
- declare const convertCompletionsDeltaToBaseMessageChunk: Converter<{
135
+ export declare const convertCompletionsDeltaToBaseMessageChunk: Converter<{
136
136
  delta: Record<string, any>;
137
137
  rawResponse: OpenAI.Chat.Completions.ChatCompletionChunk;
138
138
  includeRawResponse?: boolean;
@@ -166,7 +166,7 @@ declare const convertCompletionsDeltaToBaseMessageChunk: Converter<{
166
166
  * // Returns: { type: "image_url", image_url: { url: "data:image/png;base64,iVBORw0KGgo..." } }
167
167
  * ```
168
168
  */
169
- declare const convertStandardContentBlockToCompletionsContentPart: Converter<ContentBlock.Standard, OpenAI.Chat.Completions.ChatCompletionContentPartImage | OpenAI.Chat.Completions.ChatCompletionContentPartInputAudio | OpenAI.Chat.Completions.ChatCompletionContentPart.File | undefined>;
169
+ export declare const convertStandardContentBlockToCompletionsContentPart: Converter<ContentBlock.Standard, OpenAI.Chat.Completions.ChatCompletionContentPartImage | OpenAI.Chat.Completions.ChatCompletionContentPartInputAudio | OpenAI.Chat.Completions.ChatCompletionContentPart.File | undefined>;
170
170
  /**
171
171
  * Converts a LangChain BaseMessage with standard content blocks to an OpenAI Chat Completions API message parameter.
172
172
  *
@@ -232,7 +232,7 @@ declare const convertStandardContentBlockToCompletionsContentPart: Converter<Con
232
232
  * // }
233
233
  * ```
234
234
  */
235
- declare const convertStandardContentMessageToCompletionsMessage: Converter<{
235
+ export declare const convertStandardContentMessageToCompletionsMessage: Converter<{
236
236
  message: BaseMessage;
237
237
  model?: string;
238
238
  }, OpenAI.Chat.Completions.ChatCompletionMessageParam>;
@@ -307,10 +307,9 @@ declare const convertStandardContentMessageToCompletionsMessage: Converter<{
307
307
  * // }]
308
308
  * ```
309
309
  */
310
- declare const convertMessagesToCompletionsMessageParams: Converter<{
310
+ export declare const convertMessagesToCompletionsMessageParams: Converter<{
311
311
  messages: BaseMessage[];
312
312
  model?: string;
313
313
  }, OpenAI.Chat.Completions.ChatCompletionMessageParam[]>;
314
314
  //#endregion
315
- export { completionsApiContentBlockConverter, convertCompletionsDeltaToBaseMessageChunk, convertCompletionsMessageToBaseMessage, convertMessagesToCompletionsMessageParams, convertStandardContentBlockToCompletionsContentPart, convertStandardContentMessageToCompletionsMessage };
316
315
  //# sourceMappingURL=completions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"completions.d.ts","names":[],"sources":["../../src/converters/completions.ts"],"mappings":";;;;;;;;cAiDa,qCAAqC;EAChD,MAAM;EACN,OAAO;EACP,OAAO;EACP,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAuNrB,wCAAwC;EAEjD,SAAS,OAAa,KAAK,YAAY;EACvC,aAAa,OAAa,KAAK,YAAY;EAC3C;GAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAuHW,2CAA2C;EAGpD,OAAO;EACP,aAAa,OAAa,KAAK,YAAY;EAC3C;EACA,cAAc,OAAa,KAAK;GAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiHW,qDAAqD,UAChE,aAAa,UACX,OAAa,KAAK,YAAY,iCAC9B,OAAa,KAAK,YAAY,sCAC9B,OAAa,KAAK,YAAY,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+H/C,mDAAmD;EAC5D,SAAS;EAAa;GACxB,OAAa,KAAK,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAgKnB,2CAA2C;EACpD,UAAU;EAAe;GAC3B,OAAa,KAAK,YAAY"}
1
+ {"version":3,"file":"completions.d.ts","names":["OpenAIClient"],"sources":["../../src/converters/completions.ts"],"mappings":";;;;;;;;qBAiDa,qCAAqC;EAChD,MAAM;EACN,OAAO;EACP,OAAO;EACP,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAuNrB,wCAAwC;EAEjD,SAASA,OAAa,KAAK,YAAY;EACvC,aAAaA,OAAa,KAAK,YAAY;EAC3C;GAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAuHW,2CAA2C;EAGpD,OAAO;EACP,aAAaA,OAAa,KAAK,YAAY;EAC3C;EACA,cAAcA,OAAa,KAAK;GAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAiHW,qDAAqD,UAChE,aAAa,UACXA,OAAa,KAAK,YAAY,iCAC9BA,OAAa,KAAK,YAAY,sCAC9BA,OAAa,KAAK,YAAY,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA+H/C,mDAAmD;EAC5D,SAAS;EAAa;GACxBA,OAAa,KAAK,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAgKnB,2CAA2C;EACpD,UAAU;EAAe;GAC3BA,OAAa,KAAK,YAAY"}
@@ -7,11 +7,11 @@ import { Converter } from "@langchain/core/utils/format";
7
7
  type ExcludeController<T> = T extends {
8
8
  controller: unknown;
9
9
  } ? never : T;
10
- type ResponsesCreate = OpenAI.Responses["create"];
11
- type ResponsesParse = OpenAI.Responses["parse"];
12
- type ResponsesCreateInvoke = ExcludeController<Awaited<ReturnType<ResponsesCreate>>>;
13
- type ResponsesParseInvoke = ExcludeController<Awaited<ReturnType<ResponsesParse>>>;
14
- type ResponsesInputItem = OpenAI.Responses.ResponseInputItem;
10
+ export type ResponsesCreate = OpenAI.Responses["create"];
11
+ export type ResponsesParse = OpenAI.Responses["parse"];
12
+ export type ResponsesCreateInvoke = ExcludeController<Awaited<ReturnType<ResponsesCreate>>>;
13
+ export type ResponsesParseInvoke = ExcludeController<Awaited<ReturnType<ResponsesParse>>>;
14
+ export type ResponsesInputItem = OpenAI.Responses.ResponseInputItem;
15
15
  /**
16
16
  * Converts OpenAI Responses API usage statistics to LangChain's UsageMetadata format.
17
17
  *
@@ -63,7 +63,7 @@ type ResponsesInputItem = OpenAI.Responses.ResponseInputItem;
63
63
  * - This converter is specifically designed for OpenAI's Responses API format and
64
64
  * may differ from other OpenAI API endpoints
65
65
  */
66
- declare const convertResponsesUsageToUsageMetadata: Converter<OpenAI.Responses.ResponseUsage | undefined, UsageMetadata>;
66
+ export declare const convertResponsesUsageToUsageMetadata: Converter<OpenAI.Responses.ResponseUsage | undefined, UsageMetadata>;
67
67
  /**
68
68
  * Converts an OpenAI Responses API response to a LangChain AIMessage.
69
69
  *
@@ -113,7 +113,7 @@ declare const convertResponsesUsageToUsageMetadata: Converter<OpenAI.Responses.R
113
113
  * Tool calls are parsed and validated. Invalid tool calls (malformed JSON, etc.) are captured
114
114
  * in the `invalid_tool_calls` array rather than throwing errors.
115
115
  */
116
- declare const convertResponsesMessageToAIMessage: Converter<ResponsesCreateInvoke | ResponsesParseInvoke, AIMessage>;
116
+ export declare const convertResponsesMessageToAIMessage: Converter<ResponsesCreateInvoke | ResponsesParseInvoke, AIMessage>;
117
117
  /**
118
118
  * Converts a LangChain ChatOpenAI reasoning summary to an OpenAI Responses API reasoning item.
119
119
  *
@@ -173,7 +173,7 @@ declare const convertResponsesMessageToAIMessage: Converter<ResponsesCreateInvok
173
173
  * - This is the inverse operation of the streaming accumulation that happens in
174
174
  * `convertResponsesDeltaToChatGenerationChunk`
175
175
  */
176
- declare const convertReasoningSummaryToResponsesReasoningItem: Converter<ChatOpenAIReasoningSummary, OpenAI.Responses.ResponseReasoningItem>;
176
+ export declare const convertReasoningSummaryToResponsesReasoningItem: Converter<ChatOpenAIReasoningSummary, OpenAI.Responses.ResponseReasoningItem>;
177
177
  /**
178
178
  * Converts OpenAI Responses API stream events to LangChain ChatGenerationChunk objects.
179
179
  *
@@ -229,7 +229,7 @@ declare const convertReasoningSummaryToResponsesReasoningItem: Converter<ChatOpe
229
229
  * - Usage metadata is only available in `response.completed` events
230
230
  * - Partial images are intentionally ignored to prevent memory bloat in conversation history
231
231
  */
232
- declare const convertResponsesDeltaToChatGenerationChunk: Converter<OpenAI.Responses.ResponseStreamEvent, ChatGenerationChunk | null>;
232
+ export declare const convertResponsesDeltaToChatGenerationChunk: Converter<OpenAI.Responses.ResponseStreamEvent, ChatGenerationChunk | null>;
233
233
  /**
234
234
  * Converts a single LangChain BaseMessage to OpenAI Responses API input format.
235
235
  *
@@ -269,7 +269,7 @@ declare const convertResponsesDeltaToChatGenerationChunk: Converter<OpenAI.Respo
269
269
  * // ]
270
270
  * ```
271
271
  */
272
- declare const convertStandardContentMessageToResponsesInput: Converter<BaseMessage, OpenAI.Responses.ResponseInputItem[]>;
272
+ export declare const convertStandardContentMessageToResponsesInput: Converter<BaseMessage, OpenAI.Responses.ResponseInputItem[]>;
273
273
  /**
274
274
  * - MCP (Model Context Protocol) approval responses
275
275
  * - Zero Data Retention (ZDR) mode handling
@@ -300,11 +300,10 @@ declare const convertStandardContentMessageToResponsesInput: Converter<BaseMessa
300
300
  * });
301
301
  * ```
302
302
  */
303
- declare const convertMessagesToResponsesInput: Converter<{
303
+ export declare const convertMessagesToResponsesInput: Converter<{
304
304
  messages: BaseMessage[];
305
305
  zdrEnabled: boolean;
306
306
  model: string;
307
307
  }, ResponsesInputItem[]>;
308
308
  //#endregion
309
- export { ResponsesCreate, ResponsesCreateInvoke, ResponsesInputItem, ResponsesParse, ResponsesParseInvoke, convertMessagesToResponsesInput, convertReasoningSummaryToResponsesReasoningItem, convertResponsesDeltaToChatGenerationChunk, convertResponsesMessageToAIMessage, convertResponsesUsageToUsageMetadata, convertStandardContentMessageToResponsesInput };
310
309
  //# sourceMappingURL=responses.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"responses.d.cts","names":[],"sources":["../../src/converters/responses.ts"],"mappings":";;;;;;KA0MK,kBAAkB,KAAK;EAAY;YAAgC;KAE5D,kBAAkB,OAAa;KAC/B,iBAAiB,OAAa;KAE9B,wBAAwB,kBAClC,QAAQ,WAAW;KAET,uBAAuB,kBACjC,QAAQ,WAAW;KAGT,qBAAqB,OAAa,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA6F3C,sCAAsC,UACjD,OAAa,UAAU,2BACvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAyEW,oCAAoC,UAC/C,wBAAwB,sBACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAuOW,iDAAiD,UAC5D,4BACA,OAAa,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAoFZ,4CAA4C,UACvD,OAAa,UAAU,qBACvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiZW,+CAA+C,UAC1D,aACA,OAAa,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkYZ,iCAAiC;EAC1C,UAAU;EAAe;EAAqB;GAChD"}
1
+ {"version":3,"file":"responses.d.cts","names":["OpenAIClient"],"sources":["../../src/converters/responses.ts"],"mappings":";;;;;;KA0MK,kBAAkB,KAAK;EAAY;YAAgC;YAE5D,kBAAkBA,OAAa;YAC/B,iBAAiBA,OAAa;YAE9B,wBAAwB,kBAClC,QAAQ,WAAW;YAET,uBAAuB,kBACjC,QAAQ,WAAW;YAGT,qBAAqBA,OAAa,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA6F3C,sCAAsC,UACjDA,OAAa,UAAU,2BACvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAyEW,oCAAoC,UAC/C,wBAAwB,sBACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAuOW,iDAAiD,UAC5D,4BACAA,OAAa,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAoFZ,4CAA4C,UACvDA,OAAa,UAAU,qBACvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAiZW,+CAA+C,UAC1D,aACAA,OAAa,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAkYZ,iCAAiC;EAC1C,UAAU;EAAe;EAAqB;GAChD"}
@@ -7,11 +7,11 @@ import { Converter } from "@langchain/core/utils/format";
7
7
  type ExcludeController<T> = T extends {
8
8
  controller: unknown;
9
9
  } ? never : T;
10
- type ResponsesCreate = OpenAI.Responses["create"];
11
- type ResponsesParse = OpenAI.Responses["parse"];
12
- type ResponsesCreateInvoke = ExcludeController<Awaited<ReturnType<ResponsesCreate>>>;
13
- type ResponsesParseInvoke = ExcludeController<Awaited<ReturnType<ResponsesParse>>>;
14
- type ResponsesInputItem = OpenAI.Responses.ResponseInputItem;
10
+ export type ResponsesCreate = OpenAI.Responses["create"];
11
+ export type ResponsesParse = OpenAI.Responses["parse"];
12
+ export type ResponsesCreateInvoke = ExcludeController<Awaited<ReturnType<ResponsesCreate>>>;
13
+ export type ResponsesParseInvoke = ExcludeController<Awaited<ReturnType<ResponsesParse>>>;
14
+ export type ResponsesInputItem = OpenAI.Responses.ResponseInputItem;
15
15
  /**
16
16
  * Converts OpenAI Responses API usage statistics to LangChain's UsageMetadata format.
17
17
  *
@@ -63,7 +63,7 @@ type ResponsesInputItem = OpenAI.Responses.ResponseInputItem;
63
63
  * - This converter is specifically designed for OpenAI's Responses API format and
64
64
  * may differ from other OpenAI API endpoints
65
65
  */
66
- declare const convertResponsesUsageToUsageMetadata: Converter<OpenAI.Responses.ResponseUsage | undefined, UsageMetadata>;
66
+ export declare const convertResponsesUsageToUsageMetadata: Converter<OpenAI.Responses.ResponseUsage | undefined, UsageMetadata>;
67
67
  /**
68
68
  * Converts an OpenAI Responses API response to a LangChain AIMessage.
69
69
  *
@@ -113,7 +113,7 @@ declare const convertResponsesUsageToUsageMetadata: Converter<OpenAI.Responses.R
113
113
  * Tool calls are parsed and validated. Invalid tool calls (malformed JSON, etc.) are captured
114
114
  * in the `invalid_tool_calls` array rather than throwing errors.
115
115
  */
116
- declare const convertResponsesMessageToAIMessage: Converter<ResponsesCreateInvoke | ResponsesParseInvoke, AIMessage>;
116
+ export declare const convertResponsesMessageToAIMessage: Converter<ResponsesCreateInvoke | ResponsesParseInvoke, AIMessage>;
117
117
  /**
118
118
  * Converts a LangChain ChatOpenAI reasoning summary to an OpenAI Responses API reasoning item.
119
119
  *
@@ -173,7 +173,7 @@ declare const convertResponsesMessageToAIMessage: Converter<ResponsesCreateInvok
173
173
  * - This is the inverse operation of the streaming accumulation that happens in
174
174
  * `convertResponsesDeltaToChatGenerationChunk`
175
175
  */
176
- declare const convertReasoningSummaryToResponsesReasoningItem: Converter<ChatOpenAIReasoningSummary, OpenAI.Responses.ResponseReasoningItem>;
176
+ export declare const convertReasoningSummaryToResponsesReasoningItem: Converter<ChatOpenAIReasoningSummary, OpenAI.Responses.ResponseReasoningItem>;
177
177
  /**
178
178
  * Converts OpenAI Responses API stream events to LangChain ChatGenerationChunk objects.
179
179
  *
@@ -229,7 +229,7 @@ declare const convertReasoningSummaryToResponsesReasoningItem: Converter<ChatOpe
229
229
  * - Usage metadata is only available in `response.completed` events
230
230
  * - Partial images are intentionally ignored to prevent memory bloat in conversation history
231
231
  */
232
- declare const convertResponsesDeltaToChatGenerationChunk: Converter<OpenAI.Responses.ResponseStreamEvent, ChatGenerationChunk | null>;
232
+ export declare const convertResponsesDeltaToChatGenerationChunk: Converter<OpenAI.Responses.ResponseStreamEvent, ChatGenerationChunk | null>;
233
233
  /**
234
234
  * Converts a single LangChain BaseMessage to OpenAI Responses API input format.
235
235
  *
@@ -269,7 +269,7 @@ declare const convertResponsesDeltaToChatGenerationChunk: Converter<OpenAI.Respo
269
269
  * // ]
270
270
  * ```
271
271
  */
272
- declare const convertStandardContentMessageToResponsesInput: Converter<BaseMessage, OpenAI.Responses.ResponseInputItem[]>;
272
+ export declare const convertStandardContentMessageToResponsesInput: Converter<BaseMessage, OpenAI.Responses.ResponseInputItem[]>;
273
273
  /**
274
274
  * - MCP (Model Context Protocol) approval responses
275
275
  * - Zero Data Retention (ZDR) mode handling
@@ -300,11 +300,10 @@ declare const convertStandardContentMessageToResponsesInput: Converter<BaseMessa
300
300
  * });
301
301
  * ```
302
302
  */
303
- declare const convertMessagesToResponsesInput: Converter<{
303
+ export declare const convertMessagesToResponsesInput: Converter<{
304
304
  messages: BaseMessage[];
305
305
  zdrEnabled: boolean;
306
306
  model: string;
307
307
  }, ResponsesInputItem[]>;
308
308
  //#endregion
309
- export { ResponsesCreate, ResponsesCreateInvoke, ResponsesInputItem, ResponsesParse, ResponsesParseInvoke, convertMessagesToResponsesInput, convertReasoningSummaryToResponsesReasoningItem, convertResponsesDeltaToChatGenerationChunk, convertResponsesMessageToAIMessage, convertResponsesUsageToUsageMetadata, convertStandardContentMessageToResponsesInput };
310
309
  //# sourceMappingURL=responses.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"responses.d.ts","names":[],"sources":["../../src/converters/responses.ts"],"mappings":";;;;;;KA0MK,kBAAkB,KAAK;EAAY;YAAgC;KAE5D,kBAAkB,OAAa;KAC/B,iBAAiB,OAAa;KAE9B,wBAAwB,kBAClC,QAAQ,WAAW;KAET,uBAAuB,kBACjC,QAAQ,WAAW;KAGT,qBAAqB,OAAa,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA6F3C,sCAAsC,UACjD,OAAa,UAAU,2BACvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAyEW,oCAAoC,UAC/C,wBAAwB,sBACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAuOW,iDAAiD,UAC5D,4BACA,OAAa,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAoFZ,4CAA4C,UACvD,OAAa,UAAU,qBACvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiZW,+CAA+C,UAC1D,aACA,OAAa,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkYZ,iCAAiC;EAC1C,UAAU;EAAe;EAAqB;GAChD"}
1
+ {"version":3,"file":"responses.d.ts","names":["OpenAIClient"],"sources":["../../src/converters/responses.ts"],"mappings":";;;;;;KA0MK,kBAAkB,KAAK;EAAY;YAAgC;YAE5D,kBAAkBA,OAAa;YAC/B,iBAAiBA,OAAa;YAE9B,wBAAwB,kBAClC,QAAQ,WAAW;YAET,uBAAuB,kBACjC,QAAQ,WAAW;YAGT,qBAAqBA,OAAa,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA6F3C,sCAAsC,UACjDA,OAAa,UAAU,2BACvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAyEW,oCAAoC,UAC/C,wBAAwB,sBACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAuOW,iDAAiD,UAC5D,4BACAA,OAAa,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAoFZ,4CAA4C,UACvDA,OAAa,UAAU,qBACvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAiZW,+CAA+C,UAC1D,aACAA,OAAa,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAkYZ,iCAAiC;EAC1C,UAAU;EAAe;EAAqB;GAChD"}
@@ -5,12 +5,12 @@ import { Embeddings, EmbeddingsParams } from "@langchain/core/embeddings";
5
5
  /**
6
6
  * @see https://platform.openai.com/docs/guides/embeddings#embedding-models
7
7
  */
8
- type OpenAIEmbeddingModelId = OpenAI.EmbeddingModel | (string & NonNullable<unknown>);
8
+ export type OpenAIEmbeddingModelId = OpenAI.EmbeddingModel | (string & NonNullable<unknown>);
9
9
  /**
10
10
  * Interface for OpenAIEmbeddings parameters. Extends EmbeddingsParams and
11
11
  * defines additional parameters specific to the OpenAIEmbeddings class.
12
12
  */
13
- interface OpenAIEmbeddingsParams extends EmbeddingsParams {
13
+ export interface OpenAIEmbeddingsParams extends EmbeddingsParams {
14
14
  /**
15
15
  * Model name to use
16
16
  * Alias for `model`
@@ -60,7 +60,7 @@ interface OpenAIEmbeddingsParams extends EmbeddingsParams {
60
60
  *
61
61
  * ```
62
62
  */
63
- declare class OpenAIEmbeddings<TOutput = number[]> extends Embeddings<TOutput> implements Partial<OpenAIEmbeddingsParams> {
63
+ export declare class OpenAIEmbeddings<TOutput = number[]> extends Embeddings<TOutput> implements Partial<OpenAIEmbeddingsParams> {
64
64
  model: string;
65
65
  /** @deprecated Use "model" instead */
66
66
  modelName: string;
@@ -115,5 +115,4 @@ declare class OpenAIEmbeddings<TOutput = number[]> extends Embeddings<TOutput> i
115
115
  }>;
116
116
  }
117
117
  //#endregion
118
- export { OpenAIEmbeddingModelId, OpenAIEmbeddings, OpenAIEmbeddingsParams };
119
118
  //# sourceMappingURL=embeddings.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"embeddings.d.cts","names":[],"sources":["../src/embeddings.ts"],"mappings":";;;;;;;KAeY,yBACR,OAAa,2BACH;;;;;UAMG,+BAA+B;;;;;;EAM9C,WAAW;;EAEX,OAAO;;;;;EAMP;;;;EAKA;;;;;EAMA;;;;;;EAOA;;;;EAKA;;;;;;;;;;;;;;;;;;cAmBW,iBAAiB,4BACpB,WAAW,oBACR,QAAQ;EAEnB;;EAGA;EAEA;EAGA;;;;;EAMA;EAEA;EAEA;EAEA;YAEU,QAAQ;YAER,cAAc;YAEd,SAAS;EAEnB,YACE,SAAS,QAAQ;IACf;;;;;IAKA,eAAe;;IAEf,SAAS;IACT,gBAAgB;;;;;;;;;EAyCd,eAAe,kBAAkB,QAAQ;;;;;;;EAsCzC,WAAW,eAAe,QAAQ;;;;;;;;YAsBxB,mBACd,SAAS,OAAa,wBAAqB,QAAA,OAAA"}
1
+ {"version":3,"file":"embeddings.d.cts","names":["OpenAIClient"],"sources":["../src/embeddings.ts"],"mappings":";;;;;;;YAeY,yBACRA,OAAa,2BACH;;;;;iBAMG,+BAA+B;;;;;;EAM9C,WAAW;;EAEX,OAAO;;;;;EAMP;;;;EAKA;;;;;EAMA;;;;;;EAOA;;;;EAKA;;;;;;;;;;;;;;;;;;qBAmBW,iBAAiB,4BACpB,WAAW,oBACR,QAAQ;EAEnB;;EAGA;EAEA;EAGA;;;;;EAMA;EAEA;EAEA;EAEA;YAEU,QAAQA;YAER,cAAc;YAEd,SAAS;EAEnB,YACE,SAAS,QAAQ;IACf;;;;;IAKA,eAAe;;IAEf,SAAS;IACT,gBAAgB;;;;;;;;;EAyCd,eAAe,kBAAkB,QAAQ;;;;;;;EAsCzC,WAAW,eAAe,QAAQ;;;;;;;;YAsBxB,mBACd,SAASA,OAAa,wBAAqB,QAAAA,OAAA"}
@@ -5,12 +5,12 @@ import { Embeddings, EmbeddingsParams } from "@langchain/core/embeddings";
5
5
  /**
6
6
  * @see https://platform.openai.com/docs/guides/embeddings#embedding-models
7
7
  */
8
- type OpenAIEmbeddingModelId = OpenAI.EmbeddingModel | (string & NonNullable<unknown>);
8
+ export type OpenAIEmbeddingModelId = OpenAI.EmbeddingModel | (string & NonNullable<unknown>);
9
9
  /**
10
10
  * Interface for OpenAIEmbeddings parameters. Extends EmbeddingsParams and
11
11
  * defines additional parameters specific to the OpenAIEmbeddings class.
12
12
  */
13
- interface OpenAIEmbeddingsParams extends EmbeddingsParams {
13
+ export interface OpenAIEmbeddingsParams extends EmbeddingsParams {
14
14
  /**
15
15
  * Model name to use
16
16
  * Alias for `model`
@@ -60,7 +60,7 @@ interface OpenAIEmbeddingsParams extends EmbeddingsParams {
60
60
  *
61
61
  * ```
62
62
  */
63
- declare class OpenAIEmbeddings<TOutput = number[]> extends Embeddings<TOutput> implements Partial<OpenAIEmbeddingsParams> {
63
+ export declare class OpenAIEmbeddings<TOutput = number[]> extends Embeddings<TOutput> implements Partial<OpenAIEmbeddingsParams> {
64
64
  model: string;
65
65
  /** @deprecated Use "model" instead */
66
66
  modelName: string;
@@ -115,5 +115,4 @@ declare class OpenAIEmbeddings<TOutput = number[]> extends Embeddings<TOutput> i
115
115
  }>;
116
116
  }
117
117
  //#endregion
118
- export { OpenAIEmbeddingModelId, OpenAIEmbeddings, OpenAIEmbeddingsParams };
119
118
  //# sourceMappingURL=embeddings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"embeddings.d.ts","names":[],"sources":["../src/embeddings.ts"],"mappings":";;;;;;;KAeY,yBACR,OAAa,2BACH;;;;;UAMG,+BAA+B;;;;;;EAM9C,WAAW;;EAEX,OAAO;;;;;EAMP;;;;EAKA;;;;;EAMA;;;;;;EAOA;;;;EAKA;;;;;;;;;;;;;;;;;;cAmBW,iBAAiB,4BACpB,WAAW,oBACR,QAAQ;EAEnB;;EAGA;EAEA;EAGA;;;;;EAMA;EAEA;EAEA;EAEA;YAEU,QAAQ;YAER,cAAc;YAEd,SAAS;EAEnB,YACE,SAAS,QAAQ;IACf;;;;;IAKA,eAAe;;IAEf,SAAS;IACT,gBAAgB;;;;;;;;;EAyCd,eAAe,kBAAkB,QAAQ;;;;;;;EAsCzC,WAAW,eAAe,QAAQ;;;;;;;;YAsBxB,mBACd,SAAS,OAAa,wBAAqB,QAAA,OAAA"}
1
+ {"version":3,"file":"embeddings.d.ts","names":["OpenAIClient"],"sources":["../src/embeddings.ts"],"mappings":";;;;;;;YAeY,yBACRA,OAAa,2BACH;;;;;iBAMG,+BAA+B;;;;;;EAM9C,WAAW;;EAEX,OAAO;;;;;EAMP;;;;EAKA;;;;;EAMA;;;;;;EAOA;;;;EAKA;;;;;;;;;;;;;;;;;;qBAmBW,iBAAiB,4BACpB,WAAW,oBACR,QAAQ;EAEnB;;EAGA;EAEA;EAGA;;;;;EAMA;EAEA;EAEA;EAEA;YAEU,QAAQA;YAER,cAAc;YAEd,SAAS;EAEnB,YACE,SAAS,QAAQ;IACf;;;;;IAKA,eAAe;;IAEf,SAAS;IACT,gBAAgB;;;;;;;;;EAyCd,eAAe,kBAAkB,QAAQ;;;;;;;EAsCzC,WAAW,eAAe,QAAQ;;;;;;;;YAsBxB,mBACd,SAASA,OAAa,wBAAqB,QAAAA,OAAA"}
package/dist/llms.cjs CHANGED
@@ -82,7 +82,7 @@ var OpenAI = class extends _langchain_core_language_models_llms.BaseLLM {
82
82
  clientConfig;
83
83
  constructor(fields) {
84
84
  super(fields ?? {});
85
- this._addVersion("@langchain/openai", "1.6.2");
85
+ this._addVersion("@langchain/openai", "1.7.0");
86
86
  this.openAIApiKey = fields?.apiKey ?? fields?.openAIApiKey ?? (0, _langchain_core_utils_env.getEnvironmentVariable)("OPENAI_API_KEY");
87
87
  this.apiKey = this.openAIApiKey;
88
88
  this.organization = fields?.configuration?.organization ?? (0, _langchain_core_utils_env.getEnvironmentVariable)("OPENAI_ORGANIZATION");
@@ -1 +1 @@
1
- {"version":3,"file":"llms.d.cts","names":[],"sources":["../src/llms.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+Da,SAAO,oBAAoB,oBAAoB,2BAClD,QAAQ,wBACL,QAAQ;SAEZ;MAIH;EAIJ;MAEI;KAAiB;;MAQjB,cAAc;EAQlB;EAEA;EAEA;EAEA;EAEA;EAEA;EAEA;EAEA,YAAY;EAEZ;;EAGA;EAEA,cAAc;EAEd;EAEA;EAEA;EAEA;EAEA;EAEA;EAEA,eAAe;EAEf,SAAS;EAET;YAEU,QAAQ;YAER,cAAc;EAExB,YACE,SAAS,QAAQ,eACf;IACE,gBAAgB;;;;;EAqEtB,iBACE,sCACC,KAAK,OAAa;;EAmBrB,sBAAsB,KAAK,OAAa;IACtC;MACE;;;;EAWJ,qBAAqB,KAAK,OAAa;IACrC;MACE;;;;;;;;;;;;;;;;;EAoBE,UACJ,mBACA,oCACA,aAAa,2BACZ,QAAQ;EA0HJ,sBACL,eACA,oCACA,aAAa,2BACZ,eAAe;;;;;;;EAiCZ,oBACJ,SAAS,OAAa,iCACtB,UAAU,2BACT,QAAQ,cAAc,OAAa;EAEhC,oBACJ,SAAS,OAAa,oCACtB,UAAU,2BACT,QAAQ,OAAa,YAAY;;;;;;;YAkC1B,kBACR,SAAS,uCACR;EA8BH"}
1
+ {"version":3,"file":"llms.d.cts","names":["OpenAI","OpenAIClient"],"sources":["../src/llms.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+DaA,SAAO,oBAAoB,oBAAoB,2BAClD,QAAQ,wBACL,QAAQ;SAEZ;MAIH;EAIJ;MAEI;KAAiB;;MAQjB,cAAc;EAQlB;EAEA;EAEA;EAEA;EAEA;EAEA;EAEA;EAEA,YAAY;EAEZ;;EAGA;EAEA,cAAc;EAEd;EAEA;EAEA;EAEA;EAEA;EAEA;EAEA,eAAe;EAEf,SAAS;EAET;YAEU,QAAQC;YAER,cAAc;EAExB,YACE,SAAS,QAAQ,eACf;IACE,gBAAgB;;;;;EAqEtB,iBACE,sCACC,KAAKA,OAAa;;EAmBrB,sBAAsB,KAAKA,OAAa;IACtC;MACE;;;;EAWJ,qBAAqB,KAAKA,OAAa;IACrC;MACE;;;;;;;;;;;;;;;;;EAoBE,UACJ,mBACA,oCACA,aAAa,2BACZ,QAAQ;EA0HJ,sBACL,eACA,oCACA,aAAa,2BACZ,eAAe;;;;;;;EAiCZ,oBACJ,SAASA,OAAa,iCACtB,UAAU,2BACT,QAAQ,cAAcA,OAAa;EAEhC,oBACJ,SAASA,OAAa,oCACtB,UAAU,2BACT,QAAQA,OAAa,YAAY;;;;;;;YAkC1B,kBACR,SAAS,uCACR;EA8BH"}
@@ -1 +1 @@
1
- {"version":3,"file":"llms.d.ts","names":[],"sources":["../src/llms.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+Da,SAAO,oBAAoB,oBAAoB,2BAClD,QAAQ,wBACL,QAAQ;SAEZ;MAIH;EAIJ;MAEI;KAAiB;;MAQjB,cAAc;EAQlB;EAEA;EAEA;EAEA;EAEA;EAEA;EAEA;EAEA,YAAY;EAEZ;;EAGA;EAEA,cAAc;EAEd;EAEA;EAEA;EAEA;EAEA;EAEA;EAEA,eAAe;EAEf,SAAS;EAET;YAEU,QAAQ;YAER,cAAc;EAExB,YACE,SAAS,QAAQ,eACf;IACE,gBAAgB;;;;;EAqEtB,iBACE,sCACC,KAAK,OAAa;;EAmBrB,sBAAsB,KAAK,OAAa;IACtC;MACE;;;;EAWJ,qBAAqB,KAAK,OAAa;IACrC;MACE;;;;;;;;;;;;;;;;;EAoBE,UACJ,mBACA,oCACA,aAAa,2BACZ,QAAQ;EA0HJ,sBACL,eACA,oCACA,aAAa,2BACZ,eAAe;;;;;;;EAiCZ,oBACJ,SAAS,OAAa,iCACtB,UAAU,2BACT,QAAQ,cAAc,OAAa;EAEhC,oBACJ,SAAS,OAAa,oCACtB,UAAU,2BACT,QAAQ,OAAa,YAAY;;;;;;;YAkC1B,kBACR,SAAS,uCACR;EA8BH"}
1
+ {"version":3,"file":"llms.d.ts","names":["OpenAI","OpenAIClient"],"sources":["../src/llms.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+DaA,SAAO,oBAAoB,oBAAoB,2BAClD,QAAQ,wBACL,QAAQ;SAEZ;MAIH;EAIJ;MAEI;KAAiB;;MAQjB,cAAc;EAQlB;EAEA;EAEA;EAEA;EAEA;EAEA;EAEA;EAEA,YAAY;EAEZ;;EAGA;EAEA,cAAc;EAEd;EAEA;EAEA;EAEA;EAEA;EAEA;EAEA,eAAe;EAEf,SAAS;EAET;YAEU,QAAQC;YAER,cAAc;EAExB,YACE,SAAS,QAAQ,eACf;IACE,gBAAgB;;;;;EAqEtB,iBACE,sCACC,KAAKA,OAAa;;EAmBrB,sBAAsB,KAAKA,OAAa;IACtC;MACE;;;;EAWJ,qBAAqB,KAAKA,OAAa;IACrC;MACE;;;;;;;;;;;;;;;;;EAoBE,UACJ,mBACA,oCACA,aAAa,2BACZ,QAAQ;EA0HJ,sBACL,eACA,oCACA,aAAa,2BACZ,eAAe;;;;;;;EAiCZ,oBACJ,SAASA,OAAa,iCACtB,UAAU,2BACT,QAAQ,cAAcA,OAAa;EAEhC,oBACJ,SAASA,OAAa,oCACtB,UAAU,2BACT,QAAQA,OAAa,YAAY;;;;;;;YAkC1B,kBACR,SAAS,uCACR;EA8BH"}
package/dist/llms.js CHANGED
@@ -82,7 +82,7 @@ var OpenAI$2 = class extends BaseLLM {
82
82
  clientConfig;
83
83
  constructor(fields) {
84
84
  super(fields ?? {});
85
- this._addVersion("@langchain/openai", "1.6.2");
85
+ this._addVersion("@langchain/openai", "1.7.0");
86
86
  this.openAIApiKey = fields?.apiKey ?? fields?.openAIApiKey ?? getEnvironmentVariable("OPENAI_API_KEY");
87
87
  this.apiKey = this.openAIApiKey;
88
88
  this.organization = fields?.configuration?.organization ?? getEnvironmentVariable("OPENAI_ORGANIZATION");
@@ -5,14 +5,14 @@ import { z } from "zod/v4";
5
5
  /**
6
6
  * Re-export operation types from OpenAI SDK for convenience.
7
7
  */
8
- type ApplyPatchCreateFileOperation = OpenAI.Responses.ResponseApplyPatchToolCall.CreateFile;
9
- type ApplyPatchUpdateFileOperation = OpenAI.Responses.ResponseApplyPatchToolCall.UpdateFile;
10
- type ApplyPatchDeleteFileOperation = OpenAI.Responses.ResponseApplyPatchToolCall.DeleteFile;
8
+ export type ApplyPatchCreateFileOperation = OpenAI.Responses.ResponseApplyPatchToolCall.CreateFile;
9
+ export type ApplyPatchUpdateFileOperation = OpenAI.Responses.ResponseApplyPatchToolCall.UpdateFile;
10
+ export type ApplyPatchDeleteFileOperation = OpenAI.Responses.ResponseApplyPatchToolCall.DeleteFile;
11
11
  /**
12
12
  * Union type of all apply patch operations from OpenAI SDK.
13
13
  */
14
- type ApplyPatchOperation = NonNullable<OpenAI.Responses.ResponseApplyPatchToolCall["operation"]>;
15
- declare const ApplyPatchOperationSchema: z.ZodUnion<readonly [z.ZodObject<{
14
+ export type ApplyPatchOperation = NonNullable<OpenAI.Responses.ResponseApplyPatchToolCall["operation"]>;
15
+ export declare const ApplyPatchOperationSchema: z.ZodUnion<readonly [z.ZodObject<{
16
16
  type: z.ZodLiteral<"create_file">;
17
17
  path: z.ZodString;
18
18
  diff: z.ZodString;
@@ -27,7 +27,7 @@ declare const ApplyPatchOperationSchema: z.ZodUnion<readonly [z.ZodObject<{
27
27
  /**
28
28
  * Options for the Apply Patch tool.
29
29
  */
30
- interface ApplyPatchOptions {
30
+ export interface ApplyPatchOptions {
31
31
  /**
32
32
  * Execute function that handles patch operations.
33
33
  * This function receives the operation input and should return a string
@@ -65,7 +65,7 @@ interface ApplyPatchOptions {
65
65
  /**
66
66
  * OpenAI Apply Patch tool type for the Responses API.
67
67
  */
68
- type ApplyPatchTool = OpenAI.Responses.ApplyPatchTool;
68
+ export type ApplyPatchTool = OpenAI.Responses.ApplyPatchTool;
69
69
  /**
70
70
  * Creates an Apply Patch tool that allows models to propose structured diffs
71
71
  * that your integration applies. This enables iterative, multi-step code
@@ -141,7 +141,6 @@ type ApplyPatchTool = OpenAI.Responses.ApplyPatchTool;
141
141
  * - Consider backing up files before applying patches
142
142
  * - Implement "all-or-nothing" semantics if atomicity is required
143
143
  */
144
- declare function applyPatch(options: ApplyPatchOptions): DynamicStructuredTool<typeof ApplyPatchOperationSchema, ApplyPatchOperation, unknown, string>;
144
+ export declare function applyPatch(options: ApplyPatchOptions): DynamicStructuredTool<typeof ApplyPatchOperationSchema, ApplyPatchOperation, unknown, string>;
145
145
  //#endregion
146
- export { ApplyPatchCreateFileOperation, ApplyPatchDeleteFileOperation, ApplyPatchOperation, ApplyPatchOperationSchema, ApplyPatchOptions, ApplyPatchTool, ApplyPatchUpdateFileOperation, applyPatch };
147
146
  //# sourceMappingURL=applyPatch.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"applyPatch.d.cts","names":[],"sources":["../../src/tools/applyPatch.ts"],"mappings":";;;;;;;KAOY,gCACV,OAAa,UAAU,2BAA2B;KACxC,gCACV,OAAa,UAAU,2BAA2B;KACxC,gCACV,OAAa,UAAU,2BAA2B;;;;KAKxC,sBAAsB,YAChC,OAAa,UAAU;cAsBZ,2BAAyB,EAAA,mBAAA,EAAA;;;;;;;;;;;GAIpC,EAAA,KAAA;;;;UAKe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiCf,UAAU,WAAW,iCAAiC;;;;;KAM5C,iBAAiB,OAAa,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+EpC,WAAW,SAAS,oBAed,6BACX,2BACP"}
1
+ {"version":3,"file":"applyPatch.d.cts","names":["OpenAIClient"],"sources":["../../src/tools/applyPatch.ts"],"mappings":";;;;;;;YAOY,gCACVA,OAAa,UAAU,2BAA2B;YACxC,gCACVA,OAAa,UAAU,2BAA2B;YACxC,gCACVA,OAAa,UAAU,2BAA2B;;;;YAKxC,sBAAsB,YAChCA,OAAa,UAAU;qBAsBZ,2BAAyB,EAAA,mBAAA,EAAA;;;;;;;;;;;GAIpC,EAAA,KAAA;;;;iBAKe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiCf,UAAU,WAAW,iCAAiC;;;;;YAM5C,iBAAiBA,OAAa,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA+EpC,WAAW,SAAS,oBAed,6BACX,2BACP"}
@@ -5,14 +5,14 @@ import { z } from "zod/v4";
5
5
  /**
6
6
  * Re-export operation types from OpenAI SDK for convenience.
7
7
  */
8
- type ApplyPatchCreateFileOperation = OpenAI.Responses.ResponseApplyPatchToolCall.CreateFile;
9
- type ApplyPatchUpdateFileOperation = OpenAI.Responses.ResponseApplyPatchToolCall.UpdateFile;
10
- type ApplyPatchDeleteFileOperation = OpenAI.Responses.ResponseApplyPatchToolCall.DeleteFile;
8
+ export type ApplyPatchCreateFileOperation = OpenAI.Responses.ResponseApplyPatchToolCall.CreateFile;
9
+ export type ApplyPatchUpdateFileOperation = OpenAI.Responses.ResponseApplyPatchToolCall.UpdateFile;
10
+ export type ApplyPatchDeleteFileOperation = OpenAI.Responses.ResponseApplyPatchToolCall.DeleteFile;
11
11
  /**
12
12
  * Union type of all apply patch operations from OpenAI SDK.
13
13
  */
14
- type ApplyPatchOperation = NonNullable<OpenAI.Responses.ResponseApplyPatchToolCall["operation"]>;
15
- declare const ApplyPatchOperationSchema: z.ZodUnion<readonly [z.ZodObject<{
14
+ export type ApplyPatchOperation = NonNullable<OpenAI.Responses.ResponseApplyPatchToolCall["operation"]>;
15
+ export declare const ApplyPatchOperationSchema: z.ZodUnion<readonly [z.ZodObject<{
16
16
  type: z.ZodLiteral<"create_file">;
17
17
  path: z.ZodString;
18
18
  diff: z.ZodString;
@@ -27,7 +27,7 @@ declare const ApplyPatchOperationSchema: z.ZodUnion<readonly [z.ZodObject<{
27
27
  /**
28
28
  * Options for the Apply Patch tool.
29
29
  */
30
- interface ApplyPatchOptions {
30
+ export interface ApplyPatchOptions {
31
31
  /**
32
32
  * Execute function that handles patch operations.
33
33
  * This function receives the operation input and should return a string
@@ -65,7 +65,7 @@ interface ApplyPatchOptions {
65
65
  /**
66
66
  * OpenAI Apply Patch tool type for the Responses API.
67
67
  */
68
- type ApplyPatchTool = OpenAI.Responses.ApplyPatchTool;
68
+ export type ApplyPatchTool = OpenAI.Responses.ApplyPatchTool;
69
69
  /**
70
70
  * Creates an Apply Patch tool that allows models to propose structured diffs
71
71
  * that your integration applies. This enables iterative, multi-step code
@@ -141,7 +141,6 @@ type ApplyPatchTool = OpenAI.Responses.ApplyPatchTool;
141
141
  * - Consider backing up files before applying patches
142
142
  * - Implement "all-or-nothing" semantics if atomicity is required
143
143
  */
144
- declare function applyPatch(options: ApplyPatchOptions): DynamicStructuredTool<typeof ApplyPatchOperationSchema, ApplyPatchOperation, unknown, string>;
144
+ export declare function applyPatch(options: ApplyPatchOptions): DynamicStructuredTool<typeof ApplyPatchOperationSchema, ApplyPatchOperation, unknown, string>;
145
145
  //#endregion
146
- export { ApplyPatchCreateFileOperation, ApplyPatchDeleteFileOperation, ApplyPatchOperation, ApplyPatchOperationSchema, ApplyPatchOptions, ApplyPatchTool, ApplyPatchUpdateFileOperation, applyPatch };
147
146
  //# sourceMappingURL=applyPatch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"applyPatch.d.ts","names":[],"sources":["../../src/tools/applyPatch.ts"],"mappings":";;;;;;;KAOY,gCACV,OAAa,UAAU,2BAA2B;KACxC,gCACV,OAAa,UAAU,2BAA2B;KACxC,gCACV,OAAa,UAAU,2BAA2B;;;;KAKxC,sBAAsB,YAChC,OAAa,UAAU;cAsBZ,2BAAyB,EAAA,mBAAA,EAAA;;;;;;;;;;;GAIpC,EAAA,KAAA;;;;UAKe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiCf,UAAU,WAAW,iCAAiC;;;;;KAM5C,iBAAiB,OAAa,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+EpC,WAAW,SAAS,oBAed,6BACX,2BACP"}
1
+ {"version":3,"file":"applyPatch.d.ts","names":["OpenAIClient"],"sources":["../../src/tools/applyPatch.ts"],"mappings":";;;;;;;YAOY,gCACVA,OAAa,UAAU,2BAA2B;YACxC,gCACVA,OAAa,UAAU,2BAA2B;YACxC,gCACVA,OAAa,UAAU,2BAA2B;;;;YAKxC,sBAAsB,YAChCA,OAAa,UAAU;qBAsBZ,2BAAyB,EAAA,mBAAA,EAAA;;;;;;;;;;;GAIpC,EAAA,KAAA;;;;iBAKe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiCf,UAAU,WAAW,iCAAiC;;;;;YAM5C,iBAAiBA,OAAa,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA+EpC,WAAW,SAAS,oBAed,6BACX,2BACP"}
@@ -5,12 +5,12 @@ import { ServerTool } from "@langchain/core/tools";
5
5
  * Memory limit options for the Code Interpreter container.
6
6
  * Higher tiers offer more RAM and are billed at different rates.
7
7
  */
8
- type CodeInterpreterMemoryLimit = "1g" | "4g" | "16g" | "64g";
8
+ export type CodeInterpreterMemoryLimit = "1g" | "4g" | "16g" | "64g";
9
9
  /**
10
10
  * Auto container configuration for Code Interpreter.
11
11
  * Creates a new container automatically or reuses an active one.
12
12
  */
13
- interface CodeInterpreterAutoContainer {
13
+ export interface CodeInterpreterAutoContainer {
14
14
  /**
15
15
  * Memory limit for the container.
16
16
  * - `"1g"` (default): 1 GB RAM
@@ -29,7 +29,7 @@ interface CodeInterpreterAutoContainer {
29
29
  /**
30
30
  * Options for the Code Interpreter tool.
31
31
  */
32
- interface CodeInterpreterOptions {
32
+ export interface CodeInterpreterOptions {
33
33
  /**
34
34
  * The container configuration for the Code Interpreter.
35
35
  *
@@ -44,7 +44,7 @@ interface CodeInterpreterOptions {
44
44
  /**
45
45
  * OpenAI Code Interpreter tool type for the Responses API.
46
46
  */
47
- type CodeInterpreterTool = OpenAI.Responses.Tool.CodeInterpreter;
47
+ export type CodeInterpreterTool = OpenAI.Responses.Tool.CodeInterpreter;
48
48
  /**
49
49
  * Creates a Code Interpreter tool that allows models to write and run Python code
50
50
  * in a sandboxed environment to solve complex problems.
@@ -117,7 +117,6 @@ type CodeInterpreterTool = OpenAI.Responses.Tool.CodeInterpreter;
117
117
  * - Files in model input are automatically uploaded to the container
118
118
  * - Generated files are returned as `container_file_citation` annotations
119
119
  */
120
- declare function codeInterpreter(options?: CodeInterpreterOptions): ServerTool;
120
+ export declare function codeInterpreter(options?: CodeInterpreterOptions): ServerTool;
121
121
  //#endregion
122
- export { CodeInterpreterAutoContainer, CodeInterpreterMemoryLimit, CodeInterpreterOptions, CodeInterpreterTool, codeInterpreter };
123
122
  //# sourceMappingURL=codeInterpreter.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"codeInterpreter.d.cts","names":[],"sources":["../../src/tools/codeInterpreter.ts"],"mappings":";;;;;;;KAOY;;;;;UAMK;;;;;;;;EAQf,cAAc;;;;;;EAMd;;;;;UAMe;;;;;;;;;;EAUf,qBAAqB;;;;;KAMX,sBAAsB,OAAa,UAAU,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+F9C,gBAAgB,UAAU,yBAAyB"}
1
+ {"version":3,"file":"codeInterpreter.d.cts","names":["OpenAIClient"],"sources":["../../src/tools/codeInterpreter.ts"],"mappings":";;;;;;;YAOY;;;;;iBAMK;;;;;;;;EAQf,cAAc;;;;;;EAMd;;;;;iBAMe;;;;;;;;;;EAUf,qBAAqB;;;;;YAMX,sBAAsBA,OAAa,UAAU,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA+F9C,gBAAgB,UAAU,yBAAyB"}
@@ -5,12 +5,12 @@ import { ServerTool } from "@langchain/core/tools";
5
5
  * Memory limit options for the Code Interpreter container.
6
6
  * Higher tiers offer more RAM and are billed at different rates.
7
7
  */
8
- type CodeInterpreterMemoryLimit = "1g" | "4g" | "16g" | "64g";
8
+ export type CodeInterpreterMemoryLimit = "1g" | "4g" | "16g" | "64g";
9
9
  /**
10
10
  * Auto container configuration for Code Interpreter.
11
11
  * Creates a new container automatically or reuses an active one.
12
12
  */
13
- interface CodeInterpreterAutoContainer {
13
+ export interface CodeInterpreterAutoContainer {
14
14
  /**
15
15
  * Memory limit for the container.
16
16
  * - `"1g"` (default): 1 GB RAM
@@ -29,7 +29,7 @@ interface CodeInterpreterAutoContainer {
29
29
  /**
30
30
  * Options for the Code Interpreter tool.
31
31
  */
32
- interface CodeInterpreterOptions {
32
+ export interface CodeInterpreterOptions {
33
33
  /**
34
34
  * The container configuration for the Code Interpreter.
35
35
  *
@@ -44,7 +44,7 @@ interface CodeInterpreterOptions {
44
44
  /**
45
45
  * OpenAI Code Interpreter tool type for the Responses API.
46
46
  */
47
- type CodeInterpreterTool = OpenAI.Responses.Tool.CodeInterpreter;
47
+ export type CodeInterpreterTool = OpenAI.Responses.Tool.CodeInterpreter;
48
48
  /**
49
49
  * Creates a Code Interpreter tool that allows models to write and run Python code
50
50
  * in a sandboxed environment to solve complex problems.
@@ -117,7 +117,6 @@ type CodeInterpreterTool = OpenAI.Responses.Tool.CodeInterpreter;
117
117
  * - Files in model input are automatically uploaded to the container
118
118
  * - Generated files are returned as `container_file_citation` annotations
119
119
  */
120
- declare function codeInterpreter(options?: CodeInterpreterOptions): ServerTool;
120
+ export declare function codeInterpreter(options?: CodeInterpreterOptions): ServerTool;
121
121
  //#endregion
122
- export { CodeInterpreterAutoContainer, CodeInterpreterMemoryLimit, CodeInterpreterOptions, CodeInterpreterTool, codeInterpreter };
123
122
  //# sourceMappingURL=codeInterpreter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"codeInterpreter.d.ts","names":[],"sources":["../../src/tools/codeInterpreter.ts"],"mappings":";;;;;;;KAOY;;;;;UAMK;;;;;;;;EAQf,cAAc;;;;;;EAMd;;;;;UAMe;;;;;;;;;;EAUf,qBAAqB;;;;;KAMX,sBAAsB,OAAa,UAAU,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+F9C,gBAAgB,UAAU,yBAAyB"}
1
+ {"version":3,"file":"codeInterpreter.d.ts","names":["OpenAIClient"],"sources":["../../src/tools/codeInterpreter.ts"],"mappings":";;;;;;;YAOY;;;;;iBAMK;;;;;;;;EAQf,cAAc;;;;;;EAMd;;;;;iBAMe;;;;;;;;;;EAUf,qBAAqB;;;;;YAMX,sBAAsBA,OAAa,UAAU,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA+F9C,gBAAgB,UAAU,yBAAyB"}
@@ -6,24 +6,24 @@ import { z } from "zod/v4";
6
6
  /**
7
7
  * The type of computer environment to control.
8
8
  */
9
- type ComputerUseEnvironment = "browser" | "mac" | "windows" | "linux" | "ubuntu";
9
+ export type ComputerUseEnvironment = "browser" | "mac" | "windows" | "linux" | "ubuntu";
10
10
  /**
11
11
  * Re-export action types from OpenAI SDK for convenience.
12
12
  */
13
- type ComputerUseClickAction = OpenAI.Responses.ResponseComputerToolCall.Click;
14
- type ComputerUseDoubleClickAction = OpenAI.Responses.ResponseComputerToolCall.DoubleClick;
15
- type ComputerUseDragAction = OpenAI.Responses.ResponseComputerToolCall.Drag;
16
- type ComputerUseKeypressAction = OpenAI.Responses.ResponseComputerToolCall.Keypress;
17
- type ComputerUseMoveAction = OpenAI.Responses.ResponseComputerToolCall.Move;
18
- type ComputerUseScreenshotAction = OpenAI.Responses.ResponseComputerToolCall.Screenshot;
19
- type ComputerUseScrollAction = OpenAI.Responses.ResponseComputerToolCall.Scroll;
20
- type ComputerUseTypeAction = OpenAI.Responses.ResponseComputerToolCall.Type;
21
- type ComputerUseWaitAction = OpenAI.Responses.ResponseComputerToolCall.Wait;
13
+ export type ComputerUseClickAction = OpenAI.Responses.ResponseComputerToolCall.Click;
14
+ export type ComputerUseDoubleClickAction = OpenAI.Responses.ResponseComputerToolCall.DoubleClick;
15
+ export type ComputerUseDragAction = OpenAI.Responses.ResponseComputerToolCall.Drag;
16
+ export type ComputerUseKeypressAction = OpenAI.Responses.ResponseComputerToolCall.Keypress;
17
+ export type ComputerUseMoveAction = OpenAI.Responses.ResponseComputerToolCall.Move;
18
+ export type ComputerUseScreenshotAction = OpenAI.Responses.ResponseComputerToolCall.Screenshot;
19
+ export type ComputerUseScrollAction = OpenAI.Responses.ResponseComputerToolCall.Scroll;
20
+ export type ComputerUseTypeAction = OpenAI.Responses.ResponseComputerToolCall.Type;
21
+ export type ComputerUseWaitAction = OpenAI.Responses.ResponseComputerToolCall.Wait;
22
22
  /**
23
23
  * Union type of all computer use actions from OpenAI SDK.
24
24
  */
25
- type ComputerUseAction = OpenAI.Responses.ResponseComputerToolCall["action"];
26
- declare const ComputerUseActionSchema: z.ZodObject<{
25
+ export type ComputerUseAction = OpenAI.Responses.ResponseComputerToolCall["action"];
26
+ export declare const ComputerUseActionSchema: z.ZodObject<{
27
27
  action: z.ZodUnion<readonly [z.ZodObject<{
28
28
  type: z.ZodLiteral<"screenshot">;
29
29
  }, z.core.$strip>, z.ZodObject<{
@@ -79,14 +79,14 @@ declare const ComputerUseActionSchema: z.ZodObject<{
79
79
  * Input structure for the Computer Use tool.
80
80
  * The action is wrapped in an `action` property.
81
81
  */
82
- interface ComputerUseInput {
82
+ export interface ComputerUseInput {
83
83
  action: ComputerUseAction;
84
84
  }
85
- type ComputerUseReturnType = string | Promise<string> | ToolMessage<any> | Promise<ToolMessage<any>>;
85
+ export type ComputerUseReturnType = string | Promise<string> | ToolMessage<any> | Promise<ToolMessage<any>>;
86
86
  /**
87
87
  * Options for the Computer Use tool.
88
88
  */
89
- interface ComputerUseOptions {
89
+ export interface ComputerUseOptions {
90
90
  /**
91
91
  * The width of the computer display in pixels.
92
92
  */
@@ -114,7 +114,7 @@ interface ComputerUseOptions {
114
114
  /**
115
115
  * OpenAI Computer Use tool type for the Responses API.
116
116
  */
117
- type ComputerUseTool = OpenAI.Responses.ComputerUsePreviewTool;
117
+ export type ComputerUseTool = OpenAI.Responses.ComputerUsePreviewTool;
118
118
  /**
119
119
  * Creates a Computer Use tool that allows models to control computer interfaces
120
120
  * and perform tasks by simulating mouse clicks, keyboard input, scrolling, and more.
@@ -227,7 +227,6 @@ type ComputerUseTool = OpenAI.Responses.ComputerUsePreviewTool;
227
227
  * - Use `truncation: "auto"` parameter when making requests
228
228
  * - Recommended to use with `reasoning.summary` for debugging
229
229
  */
230
- declare function computerUse(options: ComputerUseOptions): DynamicStructuredTool<typeof ComputerUseActionSchema, ComputerUseInput, unknown, ComputerUseReturnType>;
230
+ export declare function computerUse(options: ComputerUseOptions): DynamicStructuredTool<typeof ComputerUseActionSchema, ComputerUseInput, unknown, ComputerUseReturnType>;
231
231
  //#endregion
232
- export { ComputerUseAction, ComputerUseActionSchema, ComputerUseClickAction, ComputerUseDoubleClickAction, ComputerUseDragAction, ComputerUseEnvironment, ComputerUseInput, ComputerUseKeypressAction, ComputerUseMoveAction, ComputerUseOptions, ComputerUseReturnType, ComputerUseScreenshotAction, ComputerUseScrollAction, ComputerUseTool, ComputerUseTypeAction, ComputerUseWaitAction, computerUse };
233
232
  //# sourceMappingURL=computerUse.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"computerUse.d.cts","names":[],"sources":["../../src/tools/computerUse.ts"],"mappings":";;;;;;;;KAcY;;;;KAUA,yBACV,OAAa,UAAU,yBAAyB;KACtC,+BACV,OAAa,UAAU,yBAAyB;KACtC,wBACV,OAAa,UAAU,yBAAyB;KACtC,4BACV,OAAa,UAAU,yBAAyB;KACtC,wBACV,OAAa,UAAU,yBAAyB;KACtC,8BACV,OAAa,UAAU,yBAAyB;KACtC,0BACV,OAAa,UAAU,yBAAyB;KACtC,wBACV,OAAa,UAAU,yBAAyB;KACtC,wBACV,OAAa,UAAU,yBAAyB;;;;KAKtC,oBACV,OAAa,UAAU;cAsEZ,yBAAuB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAElC,EAAA,KAAA;;;;;UAmCe;EACf,QAAQ;;KAGE,iCAER,kBACA,mBACA,QAAQ;;;;UAKK;;;;EAIf;;;;EAKA;;;;;;;;;EAUA,aAAa;;;;;;EAOb,UACE,QAAQ,mBACR,SAAS,0BACN;;;;;KAMK,kBAAkB,OAAa,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoHrC,YAAY,SAAS,qBAmEZ,6BACd,yBACP,2BAEA"}
1
+ {"version":3,"file":"computerUse.d.cts","names":["OpenAIClient"],"sources":["../../src/tools/computerUse.ts"],"mappings":";;;;;;;;YAcY;;;;YAUA,yBACVA,OAAa,UAAU,yBAAyB;YACtC,+BACVA,OAAa,UAAU,yBAAyB;YACtC,wBACVA,OAAa,UAAU,yBAAyB;YACtC,4BACVA,OAAa,UAAU,yBAAyB;YACtC,wBACVA,OAAa,UAAU,yBAAyB;YACtC,8BACVA,OAAa,UAAU,yBAAyB;YACtC,0BACVA,OAAa,UAAU,yBAAyB;YACtC,wBACVA,OAAa,UAAU,yBAAyB;YACtC,wBACVA,OAAa,UAAU,yBAAyB;;;;YAKtC,oBACVA,OAAa,UAAU;qBAsEZ,yBAAuB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAElC,EAAA,KAAA;;;;;iBAmCe;EACf,QAAQ;;YAGE,iCAER,kBACA,mBACA,QAAQ;;;;iBAKK;;;;EAIf;;;;EAKA;;;;;;;;;EAUA,aAAa;;;;;;EAOb,UACE,QAAQ,mBACR,SAAS,0BACN;;;;;YAMK,kBAAkBA,OAAa,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAoHrC,YAAY,SAAS,qBAmEZ,6BACd,yBACP,2BAEA"}