Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: openai/openai-node
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.38.3
Choose a base ref
...
head repository: openai/openai-node
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.38.4
Choose a head ref
  • 3 commits
  • 9 files changed
  • 1 contributor

Commits on Apr 24, 2024

  1. Copy the full SHA
    7d2fd6c View commit details
  2. Copy the full SHA
    80d7697 View commit details
  3. release: 4.38.4

    stainless-bot committed Apr 24, 2024
    Copy the full SHA
    adf0524 View commit details
Showing with 38 additions and 22 deletions.
  1. +1 −1 .release-please-manifest.json
  2. +9 −0 CHANGELOG.md
  3. +2 −2 README.md
  4. +1 −1 build-deno
  5. +1 −1 package.json
  6. +12 −11 src/resources/batches.ts
  7. +6 −0 src/resources/beta/vector-stores/files.ts
  8. +5 −5 src/resources/beta/vector-stores/vector-stores.ts
  9. +1 −1 src/version.ts
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "4.38.3"
".": "4.38.4"
}
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 4.38.4 (2024-04-24)

Full Changelog: [v4.38.3...v4.38.4](https://github.com/openai/openai-node/compare/v4.38.3...v4.38.4)

### Bug Fixes

* **api:** change timestamps to unix integers ([#798](https://github.com/openai/openai-node/issues/798)) ([7271a6c](https://github.com/openai/openai-node/commit/7271a6cdc7d37151d2cae18fdd20b87d97624a84))
* **docs:** doc improvements ([#796](https://github.com/openai/openai-node/issues/796)) ([49fcc86](https://github.com/openai/openai-node/commit/49fcc86b44958795a6f5e0901f369653dfbcc637))

## 4.38.3 (2024-04-22)

Full Changelog: [v4.38.2...v4.38.3](https://github.com/openai/openai-node/compare/v4.38.2...v4.38.3)
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ You can import in Deno via:
<!-- x-release-please-start-version -->

```ts
import OpenAI from 'https://deno.land/x/openai@v4.38.3/mod.ts';
import OpenAI from 'https://deno.land/x/openai@v4.38.4/mod.ts';
```

<!-- x-release-please-end -->
@@ -119,7 +119,7 @@ More information on the lifecycle of a Run can be found in the [Run Lifecycle Do

### Bulk Upload Helpers

When creating an interacting with vector stores, you can use the polling helpers to monitor the status of operations.
When creating and interacting with vector stores, you can use the polling helpers to monitor the status of operations.
For convenience, we also provide a bulk upload helper to allow you to simultaneously upload several files at once.

```ts
2 changes: 1 addition & 1 deletion build-deno
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ This is a build produced from https://github.com/openai/openai-node – please g
Usage:
\`\`\`ts
import OpenAI from "https://deno.land/x/openai@v4.38.3/mod.ts";
import OpenAI from "https://deno.land/x/openai@v4.38.4/mod.ts";
const client = new OpenAI();
\`\`\`
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openai",
"version": "4.38.3",
"version": "4.38.4",
"description": "The official TypeScript library for the OpenAI API",
"author": "OpenAI <support@openai.com>",
"types": "dist/index.d.ts",
23 changes: 12 additions & 11 deletions src/resources/batches.ts
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@ export interface Batch {
/**
* The Unix timestamp (in seconds) for when the batch was created.
*/
created_at: string;
created_at: number;

/**
* The OpenAI API endpoint used by the batch.
@@ -90,17 +90,17 @@ export interface Batch {
/**
* The Unix timestamp (in seconds) for when the batch was cancelled.
*/
cancelled_at?: string;
cancelled_at?: number;

/**
* The Unix timestamp (in seconds) for when the batch started cancelling.
*/
cancelling_at?: string;
cancelling_at?: number;

/**
* The Unix timestamp (in seconds) for when the batch was completed.
*/
completed_at?: string;
completed_at?: number;

/**
* The ID of the file containing the outputs of requests with errors.
@@ -112,27 +112,27 @@ export interface Batch {
/**
* The Unix timestamp (in seconds) for when the batch expired.
*/
expired_at?: string;
expired_at?: number;

/**
* The Unix timestamp (in seconds) for when the batch will expire.
*/
expires_at?: string;
expires_at?: number;

/**
* The Unix timestamp (in seconds) for when the batch failed.
*/
failed_at?: string;
failed_at?: number;

/**
* The Unix timestamp (in seconds) for when the batch started finalizing.
*/
finalizing_at?: string;
finalizing_at?: number;

/**
* The Unix timestamp (in seconds) for when the batch started processing.
*/
in_progress_at?: string;
in_progress_at?: number;

/**
* Set of 16 key-value pairs that can be attached to an object. This can be useful
@@ -225,8 +225,9 @@ export interface BatchCreateParams {
* See [upload file](https://platform.openai.com/docs/api-reference/files/create)
* for how to upload a file.
*
* Your input file must be formatted as a JSONL file, and must be uploaded with the
* purpose `batch`.
* Your input file must be formatted as a
* [JSONL file](https://platform.openai.com/docs/api-reference/batch/requestInput),
* and must be uploaded with the purpose `batch`.
*/
input_file_id: string;

6 changes: 6 additions & 0 deletions src/resources/beta/vector-stores/files.ts
Original file line number Diff line number Diff line change
@@ -203,6 +203,12 @@ export interface VectorStoreFile {
*/
status: 'in_progress' | 'completed' | 'cancelled' | 'failed';

/**
* The total vector store usage in bytes. Note that this may be different from the
* original file size.
*/
usage_bytes: number;

/**
* The ID of the
* [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object)
10 changes: 5 additions & 5 deletions src/resources/beta/vector-stores/vector-stores.ts
Original file line number Diff line number Diff line change
@@ -93,11 +93,6 @@ export interface VectorStore {
*/
id: string;

/**
* The byte size of the vector store.
*/
bytes: number;

/**
* The Unix timestamp (in seconds) for when the vector store was created.
*/
@@ -135,6 +130,11 @@ export interface VectorStore {
*/
status: 'expired' | 'in_progress' | 'completed';

/**
* The total number of bytes used by the files in the vector store.
*/
usage_bytes: number;

/**
* The expiration policy for a vector store.
*/
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '4.38.3'; // x-release-please-version
export const VERSION = '4.38.4'; // x-release-please-version