openai 4.35.0 → 4.37.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 (162) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +16 -2
  3. package/index.d.mts +8 -1
  4. package/index.d.ts +8 -1
  5. package/index.d.ts.map +1 -1
  6. package/index.js +5 -1
  7. package/index.js.map +1 -1
  8. package/index.mjs +5 -1
  9. package/index.mjs.map +1 -1
  10. package/lib/AssistantStream.d.ts +2 -2
  11. package/lib/AssistantStream.d.ts.map +1 -1
  12. package/lib/Util.d.ts +5 -0
  13. package/lib/Util.d.ts.map +1 -0
  14. package/lib/Util.js +26 -0
  15. package/lib/Util.js.map +1 -0
  16. package/lib/Util.mjs +22 -0
  17. package/lib/Util.mjs.map +1 -0
  18. package/package.json +1 -1
  19. package/resources/beta/{assistants/assistants.d.ts → assistants.d.ts} +217 -41
  20. package/resources/beta/assistants.d.ts.map +1 -0
  21. package/resources/beta/{assistants/assistants.js → assistants.js} +6 -13
  22. package/resources/beta/assistants.js.map +1 -0
  23. package/resources/beta/{assistants/assistants.mjs → assistants.mjs} +6 -13
  24. package/resources/beta/assistants.mjs.map +1 -0
  25. package/resources/beta/beta.d.ts +11 -2
  26. package/resources/beta/beta.d.ts.map +1 -1
  27. package/resources/beta/beta.js +5 -1
  28. package/resources/beta/beta.js.map +1 -1
  29. package/resources/beta/beta.mjs +5 -1
  30. package/resources/beta/beta.mjs.map +1 -1
  31. package/resources/beta/index.d.ts +2 -1
  32. package/resources/beta/index.d.ts.map +1 -1
  33. package/resources/beta/index.js +11 -8
  34. package/resources/beta/index.js.map +1 -1
  35. package/resources/beta/index.mjs +2 -1
  36. package/resources/beta/index.mjs.map +1 -1
  37. package/resources/beta/threads/index.d.ts +1 -1
  38. package/resources/beta/threads/index.d.ts.map +1 -1
  39. package/resources/beta/threads/index.js +6 -6
  40. package/resources/beta/threads/index.js.map +1 -1
  41. package/resources/beta/threads/index.mjs +1 -1
  42. package/resources/beta/threads/{messages/messages.d.ts → messages.d.ts} +27 -28
  43. package/resources/beta/threads/messages.d.ts.map +1 -0
  44. package/resources/beta/threads/{messages/messages.js → messages.js} +5 -12
  45. package/resources/beta/threads/messages.js.map +1 -0
  46. package/resources/beta/threads/{messages/messages.mjs → messages.mjs} +5 -12
  47. package/resources/beta/threads/messages.mjs.map +1 -0
  48. package/resources/beta/threads/runs/index.d.ts +1 -1
  49. package/resources/beta/threads/runs/index.d.ts.map +1 -1
  50. package/resources/beta/threads/runs/runs.d.ts +75 -29
  51. package/resources/beta/threads/runs/runs.d.ts.map +1 -1
  52. package/resources/beta/threads/runs/runs.js +6 -6
  53. package/resources/beta/threads/runs/runs.js.map +1 -1
  54. package/resources/beta/threads/runs/runs.mjs +6 -6
  55. package/resources/beta/threads/runs/runs.mjs.map +1 -1
  56. package/resources/beta/threads/runs/steps.d.ts +40 -40
  57. package/resources/beta/threads/runs/steps.d.ts.map +1 -1
  58. package/resources/beta/threads/runs/steps.js +2 -2
  59. package/resources/beta/threads/runs/steps.mjs +2 -2
  60. package/resources/beta/threads/threads.d.ts +498 -32
  61. package/resources/beta/threads/threads.d.ts.map +1 -1
  62. package/resources/beta/threads/threads.js +6 -6
  63. package/resources/beta/threads/threads.js.map +1 -1
  64. package/resources/beta/threads/threads.mjs +6 -6
  65. package/resources/beta/threads/threads.mjs.map +1 -1
  66. package/resources/beta/vector-stores/file-batches.d.ts +142 -0
  67. package/resources/beta/vector-stores/file-batches.d.ts.map +1 -0
  68. package/resources/beta/vector-stores/file-batches.js +128 -0
  69. package/resources/beta/vector-stores/file-batches.js.map +1 -0
  70. package/resources/beta/vector-stores/file-batches.mjs +124 -0
  71. package/resources/beta/vector-stores/file-batches.mjs.map +1 -0
  72. package/resources/beta/vector-stores/files.d.ts +148 -0
  73. package/resources/beta/vector-stores/files.d.ts.map +1 -0
  74. package/resources/beta/vector-stores/files.js +148 -0
  75. package/resources/beta/vector-stores/files.js.map +1 -0
  76. package/resources/beta/vector-stores/files.mjs +120 -0
  77. package/resources/beta/vector-stores/files.mjs.map +1 -0
  78. package/resources/beta/vector-stores/index.d.ts +4 -0
  79. package/resources/beta/vector-stores/index.d.ts.map +1 -0
  80. package/resources/beta/vector-stores/index.js +13 -0
  81. package/resources/beta/vector-stores/index.js.map +1 -0
  82. package/resources/beta/vector-stores/index.mjs +5 -0
  83. package/resources/beta/vector-stores/index.mjs.map +1 -0
  84. package/resources/beta/vector-stores/vector-stores.d.ts +233 -0
  85. package/resources/beta/vector-stores/vector-stores.d.ts.map +1 -0
  86. package/resources/beta/vector-stores/vector-stores.js +99 -0
  87. package/resources/beta/vector-stores/vector-stores.js.map +1 -0
  88. package/resources/beta/vector-stores/vector-stores.mjs +71 -0
  89. package/resources/beta/vector-stores/vector-stores.mjs.map +1 -0
  90. package/resources/chat/chat.d.ts +3 -0
  91. package/resources/chat/chat.d.ts.map +1 -1
  92. package/resources/chat/chat.js.map +1 -1
  93. package/resources/chat/chat.mjs.map +1 -1
  94. package/resources/chat/completions.d.ts +2 -1
  95. package/resources/chat/completions.d.ts.map +1 -1
  96. package/resources/chat/completions.js.map +1 -1
  97. package/resources/chat/completions.mjs.map +1 -1
  98. package/resources/chat/index.d.ts +1 -1
  99. package/resources/chat/index.d.ts.map +1 -1
  100. package/resources/chat/index.js +3 -3
  101. package/resources/chat/index.js.map +1 -1
  102. package/resources/chat/index.mjs +1 -1
  103. package/resources/chat/index.mjs.map +1 -1
  104. package/resources/fine-tuning/jobs/jobs.d.ts +1 -1
  105. package/src/index.ts +12 -0
  106. package/src/lib/AssistantStream.ts +2 -2
  107. package/src/lib/Util.ts +23 -0
  108. package/src/resources/beta/{assistants/assistants.ts → assistants.ts} +254 -58
  109. package/src/resources/beta/beta.ts +11 -2
  110. package/src/resources/beta/index.ts +11 -2
  111. package/src/resources/beta/threads/index.ts +1 -1
  112. package/src/resources/beta/threads/{messages/messages.ts → messages.ts} +39 -38
  113. package/src/resources/beta/threads/runs/index.ts +2 -2
  114. package/src/resources/beta/threads/runs/runs.ts +94 -36
  115. package/src/resources/beta/threads/runs/steps.ts +49 -49
  116. package/src/resources/beta/threads/threads.ts +571 -37
  117. package/src/resources/beta/vector-stores/file-batches.ts +292 -0
  118. package/src/resources/beta/vector-stores/files.ts +277 -0
  119. package/src/resources/beta/vector-stores/index.ts +25 -0
  120. package/src/resources/beta/vector-stores/vector-stores.ts +318 -0
  121. package/src/resources/chat/chat.ts +23 -0
  122. package/src/resources/chat/completions.ts +2 -21
  123. package/src/resources/chat/index.ts +1 -1
  124. package/src/resources/fine-tuning/jobs/jobs.ts +1 -1
  125. package/src/version.ts +1 -1
  126. package/version.d.ts +1 -1
  127. package/version.js +1 -1
  128. package/version.mjs +1 -1
  129. package/resources/beta/assistants/assistants.d.ts.map +0 -1
  130. package/resources/beta/assistants/assistants.js.map +0 -1
  131. package/resources/beta/assistants/assistants.mjs.map +0 -1
  132. package/resources/beta/assistants/files.d.ts +0 -88
  133. package/resources/beta/assistants/files.d.ts.map +0 -1
  134. package/resources/beta/assistants/files.js +0 -81
  135. package/resources/beta/assistants/files.js.map +0 -1
  136. package/resources/beta/assistants/files.mjs +0 -53
  137. package/resources/beta/assistants/files.mjs.map +0 -1
  138. package/resources/beta/assistants/index.d.ts +0 -3
  139. package/resources/beta/assistants/index.d.ts.map +0 -1
  140. package/resources/beta/assistants/index.js +0 -11
  141. package/resources/beta/assistants/index.js.map +0 -1
  142. package/resources/beta/assistants/index.mjs +0 -4
  143. package/resources/beta/assistants/index.mjs.map +0 -1
  144. package/resources/beta/threads/messages/files.d.ts +0 -60
  145. package/resources/beta/threads/messages/files.d.ts.map +0 -1
  146. package/resources/beta/threads/messages/files.js +0 -60
  147. package/resources/beta/threads/messages/files.js.map +0 -1
  148. package/resources/beta/threads/messages/files.mjs +0 -32
  149. package/resources/beta/threads/messages/files.mjs.map +0 -1
  150. package/resources/beta/threads/messages/index.d.ts +0 -3
  151. package/resources/beta/threads/messages/index.d.ts.map +0 -1
  152. package/resources/beta/threads/messages/index.js +0 -11
  153. package/resources/beta/threads/messages/index.js.map +0 -1
  154. package/resources/beta/threads/messages/index.mjs +0 -4
  155. package/resources/beta/threads/messages/index.mjs.map +0 -1
  156. package/resources/beta/threads/messages/messages.d.ts.map +0 -1
  157. package/resources/beta/threads/messages/messages.js.map +0 -1
  158. package/resources/beta/threads/messages/messages.mjs.map +0 -1
  159. package/src/resources/beta/assistants/files.ts +0 -154
  160. package/src/resources/beta/assistants/index.ts +0 -28
  161. package/src/resources/beta/threads/messages/files.ts +0 -105
  162. package/src/resources/beta/threads/messages/index.ts +0 -30
@@ -0,0 +1,148 @@
1
+ import * as Core from 'openai/core';
2
+ import { APIResource } from 'openai/resource';
3
+ import { Uploadable } from 'openai/core';
4
+ import * as FilesAPI from 'openai/resources/beta/vector-stores/files';
5
+ import { CursorPage, type CursorPageParams } from 'openai/pagination';
6
+ export declare class Files extends APIResource {
7
+ /**
8
+ * Create a vector store file by attaching a
9
+ * [File](https://platform.openai.com/docs/api-reference/files) to a
10
+ * [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object).
11
+ */
12
+ create(vectorStoreId: string, body: FileCreateParams, options?: Core.RequestOptions): Core.APIPromise<VectorStoreFile>;
13
+ /**
14
+ * Retrieves a vector store file.
15
+ */
16
+ retrieve(vectorStoreId: string, fileId: string, options?: Core.RequestOptions): Core.APIPromise<VectorStoreFile>;
17
+ /**
18
+ * Returns a list of vector store files.
19
+ */
20
+ list(vectorStoreId: string, query?: FileListParams, options?: Core.RequestOptions): Core.PagePromise<VectorStoreFilesPage, VectorStoreFile>;
21
+ list(vectorStoreId: string, options?: Core.RequestOptions): Core.PagePromise<VectorStoreFilesPage, VectorStoreFile>;
22
+ /**
23
+ * Delete a vector store file. This will remove the file from the vector store but
24
+ * the file itself will not be deleted. To delete the file, use the
25
+ * [delete file](https://platform.openai.com/docs/api-reference/files/delete)
26
+ * endpoint.
27
+ */
28
+ del(vectorStoreId: string, fileId: string, options?: Core.RequestOptions): Core.APIPromise<VectorStoreFileDeleted>;
29
+ /**
30
+ * Attach a file to the given vector store and wait for it to be processed.
31
+ */
32
+ createAndPoll(vectorStoreId: string, body: FileCreateParams, options?: Core.RequestOptions & {
33
+ pollIntervalMs?: number;
34
+ }): Promise<VectorStoreFile>;
35
+ /**
36
+ * Wait for the vector store file to finish processing.
37
+ *
38
+ * Note: this will return even if the file failed to process, you need to check
39
+ * file.last_error and file.status to handle these cases
40
+ */
41
+ poll(vectorStoreId: string, fileId: string, options?: Core.RequestOptions & {
42
+ pollIntervalMs?: number;
43
+ }): Promise<VectorStoreFile>;
44
+ /**
45
+ * Upload a file to the `files` API and then attach it to the given vector store.
46
+ * Note the file will be asynchronously processed (you can use the alternative
47
+ * polling helper method to wait for processing to complete).
48
+ */
49
+ upload(vectorStoreId: string, file: Uploadable, options?: Core.RequestOptions): Promise<VectorStoreFile>;
50
+ /**
51
+ * Add a file to a vector store and poll until processing is complete.
52
+ */
53
+ uploadAndPoll(vectorStoreId: string, file: Uploadable, options?: Core.RequestOptions & {
54
+ pollIntervalMs?: number;
55
+ }): Promise<VectorStoreFile>;
56
+ }
57
+ export declare class VectorStoreFilesPage extends CursorPage<VectorStoreFile> {
58
+ }
59
+ /**
60
+ * A list of files attached to a vector store.
61
+ */
62
+ export interface VectorStoreFile {
63
+ /**
64
+ * The identifier, which can be referenced in API endpoints.
65
+ */
66
+ id: string;
67
+ /**
68
+ * The Unix timestamp (in seconds) for when the vector store file was created.
69
+ */
70
+ created_at: number;
71
+ /**
72
+ * The last error associated with this vector store file. Will be `null` if there
73
+ * are no errors.
74
+ */
75
+ last_error: VectorStoreFile.LastError | null;
76
+ /**
77
+ * The object type, which is always `vector_store.file`.
78
+ */
79
+ object: 'vector_store.file';
80
+ /**
81
+ * The status of the vector store file, which can be either `in_progress`,
82
+ * `completed`, `cancelled`, or `failed`. The status `completed` indicates that the
83
+ * vector store file is ready for use.
84
+ */
85
+ status: 'in_progress' | 'completed' | 'cancelled' | 'failed';
86
+ /**
87
+ * The ID of the
88
+ * [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)
89
+ * that the [File](https://platform.openai.com/docs/api-reference/files) is
90
+ * attached to.
91
+ */
92
+ vector_store_id: string;
93
+ }
94
+ export declare namespace VectorStoreFile {
95
+ /**
96
+ * The last error associated with this vector store file. Will be `null` if there
97
+ * are no errors.
98
+ */
99
+ interface LastError {
100
+ /**
101
+ * One of `server_error` or `rate_limit_exceeded`.
102
+ */
103
+ code: 'internal_error' | 'file_not_found' | 'parsing_error' | 'unhandled_mime_type';
104
+ /**
105
+ * A human-readable description of the error.
106
+ */
107
+ message: string;
108
+ }
109
+ }
110
+ export interface VectorStoreFileDeleted {
111
+ id: string;
112
+ deleted: boolean;
113
+ object: 'vector_store.file.deleted';
114
+ }
115
+ export interface FileCreateParams {
116
+ /**
117
+ * A [File](https://platform.openai.com/docs/api-reference/files) ID that the
118
+ * vector store should use. Useful for tools like `file_search` that can access
119
+ * files.
120
+ */
121
+ file_id: string;
122
+ }
123
+ export interface FileListParams extends CursorPageParams {
124
+ /**
125
+ * A cursor for use in pagination. `before` is an object ID that defines your place
126
+ * in the list. For instance, if you make a list request and receive 100 objects,
127
+ * ending with obj_foo, your subsequent call can include before=obj_foo in order to
128
+ * fetch the previous page of the list.
129
+ */
130
+ before?: string;
131
+ /**
132
+ * Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.
133
+ */
134
+ filter?: 'in_progress' | 'completed' | 'failed' | 'cancelled';
135
+ /**
136
+ * Sort order by the `created_at` timestamp of the objects. `asc` for ascending
137
+ * order and `desc` for descending order.
138
+ */
139
+ order?: 'asc' | 'desc';
140
+ }
141
+ export declare namespace Files {
142
+ export import VectorStoreFile = FilesAPI.VectorStoreFile;
143
+ export import VectorStoreFileDeleted = FilesAPI.VectorStoreFileDeleted;
144
+ export import VectorStoreFilesPage = FilesAPI.VectorStoreFilesPage;
145
+ export import FileCreateParams = FilesAPI.FileCreateParams;
146
+ export import FileListParams = FilesAPI.FileListParams;
147
+ }
148
+ //# sourceMappingURL=files.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/vector-stores/files.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAS,UAAU,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,2CAA2C,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAEtE,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;OAIG;IACH,MAAM,CACJ,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,gBAAgB,EACtB,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC;IAQnC;;OAEG;IACH,QAAQ,CACN,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC;IAOnC;;OAEG;IACH,IAAI,CACF,aAAa,EAAE,MAAM,EACrB,KAAK,CAAC,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,WAAW,CAAC,oBAAoB,EAAE,eAAe,CAAC;IAC1D,IAAI,CACF,aAAa,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,WAAW,CAAC,oBAAoB,EAAE,eAAe,CAAC;IAgB1D;;;;;OAKG;IACH,GAAG,CACD,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,sBA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AAiB,SAAS;QACxB;;WAEG;QACH,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,GAAG,eAAe,GAAG,qBAAqB,CAAC;QAEpF;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;KACjB;CACF;AAED,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IAEX,OAAO,EAAE,OAAO,CAAC;IAEjB,MAAM,EAAE,2BAA2B,CAAC;CACrC;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACtD;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,aAAa,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;IAE9D;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CACxB;AAED,yBAAiB,KAAK,CAAC;IACrB,MAAM,QAAQ,eAAe,GAAG,QAAQ,CAAC,eAAe,CAAC;IACzD,MAAM,QAAQ,sBAAsB,GAAG,QAAQ,CAAC,sBAAsB,CAAC;IACvE,MAAM,QAAQ,oBAAoB,GAAG,QAAQ,CAAC,oBAAoB,CAAC;IACnE,MAAM,QAAQ,gBAAgB,GAAG,QAAQ,CAAC,gBAAgB,CAAC;IAC3D,MAAM,QAAQ,cAAc,GAAG,QAAQ,CAAC,cAAc,CAAC;CACxD"}
@@ -0,0 +1,148 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || function (mod) {
20
+ if (mod && mod.__esModule) return mod;
21
+ var result = {};
22
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
+ __setModuleDefault(result, mod);
24
+ return result;
25
+ };
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.VectorStoreFilesPage = exports.Files = void 0;
28
+ const resource_1 = require("openai/resource");
29
+ const core_1 = require("openai/core");
30
+ const core_2 = require("openai/core");
31
+ const FilesAPI = __importStar(require("openai/resources/beta/vector-stores/files"));
32
+ const pagination_1 = require("openai/pagination");
33
+ class Files extends resource_1.APIResource {
34
+ /**
35
+ * Create a vector store file by attaching a
36
+ * [File](https://platform.openai.com/docs/api-reference/files) to a
37
+ * [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object).
38
+ */
39
+ create(vectorStoreId, body, options) {
40
+ return this._client.post(`/vector_stores/${vectorStoreId}/files`, {
41
+ body,
42
+ ...options,
43
+ headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers },
44
+ });
45
+ }
46
+ /**
47
+ * Retrieves a vector store file.
48
+ */
49
+ retrieve(vectorStoreId, fileId, options) {
50
+ return this._client.get(`/vector_stores/${vectorStoreId}/files/${fileId}`, {
51
+ ...options,
52
+ headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers },
53
+ });
54
+ }
55
+ list(vectorStoreId, query = {}, options) {
56
+ if ((0, core_1.isRequestOptions)(query)) {
57
+ return this.list(vectorStoreId, {}, query);
58
+ }
59
+ return this._client.getAPIList(`/vector_stores/${vectorStoreId}/files`, VectorStoreFilesPage, {
60
+ query,
61
+ ...options,
62
+ headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers },
63
+ });
64
+ }
65
+ /**
66
+ * Delete a vector store file. This will remove the file from the vector store but
67
+ * the file itself will not be deleted. To delete the file, use the
68
+ * [delete file](https://platform.openai.com/docs/api-reference/files/delete)
69
+ * endpoint.
70
+ */
71
+ del(vectorStoreId, fileId, options) {
72
+ return this._client.delete(`/vector_stores/${vectorStoreId}/files/${fileId}`, {
73
+ ...options,
74
+ headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers },
75
+ });
76
+ }
77
+ /**
78
+ * Attach a file to the given vector store and wait for it to be processed.
79
+ */
80
+ async createAndPoll(vectorStoreId, body, options) {
81
+ const file = await this.create(vectorStoreId, body, options);
82
+ return await this.poll(vectorStoreId, file.id, options);
83
+ }
84
+ /**
85
+ * Wait for the vector store file to finish processing.
86
+ *
87
+ * Note: this will return even if the file failed to process, you need to check
88
+ * file.last_error and file.status to handle these cases
89
+ */
90
+ async poll(vectorStoreId, fileId, options) {
91
+ const headers = { ...options?.headers, 'X-Stainless-Poll-Helper': 'true' };
92
+ if (options?.pollIntervalMs) {
93
+ headers['X-Stainless-Custom-Poll-Interval'] = options.pollIntervalMs.toString();
94
+ }
95
+ while (true) {
96
+ const fileResponse = await this.retrieve(vectorStoreId, fileId, {
97
+ ...options,
98
+ headers,
99
+ }).withResponse();
100
+ const file = fileResponse.data;
101
+ switch (file.status) {
102
+ case 'in_progress':
103
+ let sleepInterval = 5000;
104
+ if (options?.pollIntervalMs) {
105
+ sleepInterval = options.pollIntervalMs;
106
+ }
107
+ else {
108
+ const headerInterval = fileResponse.response.headers.get('openai-poll-after-ms');
109
+ if (headerInterval) {
110
+ const headerIntervalMs = parseInt(headerInterval);
111
+ if (!isNaN(headerIntervalMs)) {
112
+ sleepInterval = headerIntervalMs;
113
+ }
114
+ }
115
+ }
116
+ await (0, core_2.sleep)(sleepInterval);
117
+ break;
118
+ case 'failed':
119
+ case 'completed':
120
+ return file;
121
+ }
122
+ }
123
+ }
124
+ /**
125
+ * Upload a file to the `files` API and then attach it to the given vector store.
126
+ * Note the file will be asynchronously processed (you can use the alternative
127
+ * polling helper method to wait for processing to complete).
128
+ */
129
+ async upload(vectorStoreId, file, options) {
130
+ const fileInfo = await this._client.files.create({ file: file, purpose: 'assistants' }, options);
131
+ return this.create(vectorStoreId, { file_id: fileInfo.id }, options);
132
+ }
133
+ /**
134
+ * Add a file to a vector store and poll until processing is complete.
135
+ */
136
+ async uploadAndPoll(vectorStoreId, file, options) {
137
+ const fileInfo = await this._client.files.create({ file: file, purpose: 'assistants' }, options);
138
+ return await this.poll(vectorStoreId, fileInfo.id, options);
139
+ }
140
+ }
141
+ exports.Files = Files;
142
+ class VectorStoreFilesPage extends pagination_1.CursorPage {
143
+ }
144
+ exports.VectorStoreFilesPage = VectorStoreFilesPage;
145
+ (function (Files) {
146
+ Files.VectorStoreFilesPage = FilesAPI.VectorStoreFilesPage;
147
+ })(Files = exports.Files || (exports.Files = {}));
148
+ //# sourceMappingURL=files.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"files.js","sourceRoot":"","sources":["../../../src/resources/beta/vector-stores/files.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtF,8CAA8C;AAC9C,sCAA+C;AAC/C,sCAAgD;AAChD,oFAAsE;AACtE,kDAAsE;AAEtE,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;OAIG;IACH,MAAM,CACJ,aAAqB,EACrB,IAAsB,EACtB,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,aAAa,QAAQ,EAAE;YAChE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACjE,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,QAAQ,CACN,aA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,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,OAAO,CAAC,CAAC;QACjG,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,aAAa,CACjB,aAAqB,EACrB,IAAgB,EAChB,OAA2D;QAE3D,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,OAAO,CAAC,CAAC;QACjG,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;CACF;AAhKD,sBAgKC;AAED,MAAa,oBAAqB,SAAQ,uBAA2B;CAAG;AAAxE,oDAAwE;AAmGxE,WAAiB,KAAK;IAGN,0BAAoB,GAAG,QAAQ,CAAC,oBAAoB,CAAC;AAGrE,CAAC,EANgB,KAAK,GAAL,aAAK,KAAL,aAAK,QAMrB"}
@@ -0,0 +1,120 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from 'openai/resource';
3
+ import { isRequestOptions } from 'openai/core';
4
+ import { sleep } from 'openai/core';
5
+ import * as FilesAPI from 'openai/resources/beta/vector-stores/files';
6
+ import { CursorPage } from 'openai/pagination';
7
+ export class Files extends APIResource {
8
+ /**
9
+ * Create a vector store file by attaching a
10
+ * [File](https://platform.openai.com/docs/api-reference/files) to a
11
+ * [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object).
12
+ */
13
+ create(vectorStoreId, body, options) {
14
+ return this._client.post(`/vector_stores/${vectorStoreId}/files`, {
15
+ body,
16
+ ...options,
17
+ headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers },
18
+ });
19
+ }
20
+ /**
21
+ * Retrieves a vector store file.
22
+ */
23
+ retrieve(vectorStoreId, fileId, options) {
24
+ return this._client.get(`/vector_stores/${vectorStoreId}/files/${fileId}`, {
25
+ ...options,
26
+ headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers },
27
+ });
28
+ }
29
+ list(vectorStoreId, query = {}, options) {
30
+ if (isRequestOptions(query)) {
31
+ return this.list(vectorStoreId, {}, query);
32
+ }
33
+ return this._client.getAPIList(`/vector_stores/${vectorStoreId}/files`, VectorStoreFilesPage, {
34
+ query,
35
+ ...options,
36
+ headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers },
37
+ });
38
+ }
39
+ /**
40
+ * Delete a vector store file. This will remove the file from the vector store but
41
+ * the file itself will not be deleted. To delete the file, use the
42
+ * [delete file](https://platform.openai.com/docs/api-reference/files/delete)
43
+ * endpoint.
44
+ */
45
+ del(vectorStoreId, fileId, options) {
46
+ return this._client.delete(`/vector_stores/${vectorStoreId}/files/${fileId}`, {
47
+ ...options,
48
+ headers: { 'OpenAI-Beta': 'assistants=v2', ...options?.headers },
49
+ });
50
+ }
51
+ /**
52
+ * Attach a file to the given vector store and wait for it to be processed.
53
+ */
54
+ async createAndPoll(vectorStoreId, body, options) {
55
+ const file = await this.create(vectorStoreId, body, options);
56
+ return await this.poll(vectorStoreId, file.id, options);
57
+ }
58
+ /**
59
+ * Wait for the vector store file to finish processing.
60
+ *
61
+ * Note: this will return even if the file failed to process, you need to check
62
+ * file.last_error and file.status to handle these cases
63
+ */
64
+ async poll(vectorStoreId, fileId, options) {
65
+ const headers = { ...options?.headers, 'X-Stainless-Poll-Helper': 'true' };
66
+ if (options?.pollIntervalMs) {
67
+ headers['X-Stainless-Custom-Poll-Interval'] = options.pollIntervalMs.toString();
68
+ }
69
+ while (true) {
70
+ const fileResponse = await this.retrieve(vectorStoreId, fileId, {
71
+ ...options,
72
+ headers,
73
+ }).withResponse();
74
+ const file = fileResponse.data;
75
+ switch (file.status) {
76
+ case 'in_progress':
77
+ let sleepInterval = 5000;
78
+ if (options?.pollIntervalMs) {
79
+ sleepInterval = options.pollIntervalMs;
80
+ }
81
+ else {
82
+ const headerInterval = fileResponse.response.headers.get('openai-poll-after-ms');
83
+ if (headerInterval) {
84
+ const headerIntervalMs = parseInt(headerInterval);
85
+ if (!isNaN(headerIntervalMs)) {
86
+ sleepInterval = headerIntervalMs;
87
+ }
88
+ }
89
+ }
90
+ await sleep(sleepInterval);
91
+ break;
92
+ case 'failed':
93
+ case 'completed':
94
+ return file;
95
+ }
96
+ }
97
+ }
98
+ /**
99
+ * Upload a file to the `files` API and then attach it to the given vector store.
100
+ * Note the file will be asynchronously processed (you can use the alternative
101
+ * polling helper method to wait for processing to complete).
102
+ */
103
+ async upload(vectorStoreId, file, options) {
104
+ const fileInfo = await this._client.files.create({ file: file, purpose: 'assistants' }, options);
105
+ return this.create(vectorStoreId, { file_id: fileInfo.id }, options);
106
+ }
107
+ /**
108
+ * Add a file to a vector store and poll until processing is complete.
109
+ */
110
+ async uploadAndPoll(vectorStoreId, file, options) {
111
+ const fileInfo = await this._client.files.create({ file: file, purpose: 'assistants' }, options);
112
+ return await this.poll(vectorStoreId, fileInfo.id, options);
113
+ }
114
+ }
115
+ export class VectorStoreFilesPage extends CursorPage {
116
+ }
117
+ (function (Files) {
118
+ Files.VectorStoreFilesPage = FilesAPI.VectorStoreFilesPage;
119
+ })(Files || (Files = {}));
120
+ //# sourceMappingURL=files.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"files.mjs","sourceRoot":"","sources":["../../../src/resources/beta/vector-stores/files.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAG/E,EAAE,WAAW,EAAE,MAAM,iBAAiB;OACtC,EAAE,gBAAgB,EAAE,MAAM,aAAa;OACvC,EAAE,KAAK,EAAc,MAAM,aAAa;OACxC,KAAK,QAAQ,MAAM,2CAA2C;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VectorStoresPage, VectorStores, } from "./vector-stores.js";
2
+ export { VectorStoreFile, VectorStoreFileDeleted, FileCreateParams, FileListParams, VectorStoreFilesPage, Files, } from "./files.js";
3
+ export { VectorStoreFileBatch, FileBatchCreateParams, FileBatchListFilesParams, FileBatches, } from "./file-batches.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/vector-stores/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,gBAAgB,EAChB,YAAY,GACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,KAAK,GACN,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,wBAAwB,EACxB,WAAW,GACZ,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.FileBatches = exports.Files = exports.VectorStoreFilesPage = exports.VectorStores = exports.VectorStoresPage = void 0;
5
+ var vector_stores_1 = require("./vector-stores.js");
6
+ Object.defineProperty(exports, "VectorStoresPage", { enumerable: true, get: function () { return vector_stores_1.VectorStoresPage; } });
7
+ Object.defineProperty(exports, "VectorStores", { enumerable: true, get: function () { return vector_stores_1.VectorStores; } });
8
+ var files_1 = require("./files.js");
9
+ Object.defineProperty(exports, "VectorStoreFilesPage", { enumerable: true, get: function () { return files_1.VectorStoreFilesPage; } });
10
+ Object.defineProperty(exports, "Files", { enumerable: true, get: function () { return files_1.Files; } });
11
+ var file_batches_1 = require("./file-batches.js");
12
+ Object.defineProperty(exports, "FileBatches", { enumerable: true, get: function () { return file_batches_1.FileBatches; } });
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/beta/vector-stores/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,oDAQyB;AAFvB,iHAAA,gBAAgB,OAAA;AAChB,6GAAA,YAAY,OAAA;AAEd,oCAOiB;AAFf,6GAAA,oBAAoB,OAAA;AACpB,8FAAA,KAAK,OAAA;AAEP,kDAKwB;AADtB,2GAAA,WAAW,OAAA"}
@@ -0,0 +1,5 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export { VectorStoresPage, VectorStores, } from "./vector-stores.mjs";
3
+ export { VectorStoreFilesPage, Files, } from "./files.mjs";
4
+ export { FileBatches, } from "./file-batches.mjs";
5
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/beta/vector-stores/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAML,gBAAgB,EAChB,YAAY,GACb;OACM,EAKL,oBAAoB,EACpB,KAAK,GACN;OACM,EAIL,WAAW,GACZ"}