Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "6.4.0"
".": "6.5.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 135
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-104cced8f4c7436a76eea02e26307828166405ccfb296faffb008b72772c11a7.yml
openapi_spec_hash: fdc03ed84a65a31b80da909255e53924
config_hash: 03b48e9b8c7231a902403210dbd7dfa0
configured_endpoints: 134
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-f59befea071ed7729cbb7bce219e7f837eccfdb57e01698514e6a0bd6052ff60.yml
openapi_spec_hash: 49da48619d37932b2e257c532078b2bb
config_hash: 1af83449a09a3b4f276444dbcdd3eb67
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 6.5.0 (2025-10-17)

Full Changelog: [v6.4.0...v6.5.0](https://github.com/openai/openai-node/compare/v6.4.0...v6.5.0)

### Features

* **api:** api update ([4d21af3](https://github.com/openai/openai-node/commit/4d21af3e6a04baa0ea42d360cf3601fcc3d39705))

## 6.4.0 (2025-10-16)

Full Changelog: [v6.3.0...v6.4.0](https://github.com/openai/openai-node/compare/v6.3.0...v6.4.0)
Expand Down
7 changes: 0 additions & 7 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -477,13 +477,6 @@ Methods:
Types:

- <code><a href="./src/resources/beta/chatkit/chatkit.ts">ChatKitWorkflow</a></code>
- <code><a href="./src/resources/beta/chatkit/chatkit.ts">FilePart</a></code>
- <code><a href="./src/resources/beta/chatkit/chatkit.ts">ImagePart</a></code>
- <code><a href="./src/resources/beta/chatkit/chatkit.ts">ChatKitUploadFileResponse</a></code>

Methods:

- <code title="post /chatkit/files">client.beta.chatkit.<a href="./src/resources/beta/chatkit/chatkit.ts">uploadFile</a>({ ...params }) -> ChatKitUploadFileResponse</code>

### Sessions

Expand Down
2 changes: 1 addition & 1 deletion jsr.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openai/openai",
"version": "6.4.0",
"version": "6.5.0",
"exports": {
".": "./index.ts",
"./helpers/zod": "./helpers/zod.ts",
Expand Down
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": "6.4.0",
"version": "6.5.0",
"description": "The official TypeScript library for the OpenAI API",
"author": "OpenAI <[email protected]>",
"types": "dist/index.d.ts",
Expand Down
13 changes: 1 addition & 12 deletions src/resources/beta/beta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,7 @@ import {
TranscriptionSessionUpdatedEvent,
} from './realtime/realtime';
import * as ChatKitAPI from './chatkit/chatkit';
import {
ChatKit,
ChatKitUploadFileParams,
ChatKitUploadFileResponse,
ChatKitWorkflow,
FilePart,
ImagePart,
} from './chatkit/chatkit';
import { ChatKit, ChatKitWorkflow } from './chatkit/chatkit';
import * as ThreadsAPI from './threads/threads';
import {
AssistantResponseFormatOption,
Expand Down Expand Up @@ -166,10 +159,6 @@ export declare namespace Beta {
type TranscriptionSessionUpdatedEvent as TranscriptionSessionUpdatedEvent,
ChatKit as ChatKit,
type ChatKitWorkflow as ChatKitWorkflow,
type FilePart as FilePart,
type ImagePart as ImagePart,
type ChatKitUploadFileResponse as ChatKitUploadFileResponse,
type ChatKitUploadFileParams as ChatKitUploadFileParams,
};

export {
Expand Down
113 changes: 1 addition & 112 deletions src/resources/beta/chatkit/chatkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,35 +30,10 @@ import {
ThreadListParams,
Threads,
} from './threads';
import { APIPromise } from '../../../core/api-promise';
import { type Uploadable } from '../../../core/uploads';
import { buildHeaders } from '../../../internal/headers';
import { RequestOptions } from '../../../internal/request-options';
import { maybeMultipartFormRequestOptions } from '../../../internal/uploads';

export class ChatKit extends APIResource {
sessions: SessionsAPI.Sessions = new SessionsAPI.Sessions(this._client);
threads: ThreadsAPI.Threads = new ThreadsAPI.Threads(this._client);

/**
* Upload a ChatKit file
*
* @example
* ```ts
* const response = await client.beta.chatkit.uploadFile({
* file: fs.createReadStream('path/to/file'),
* });
* ```
*/
uploadFile(body: ChatKitUploadFileParams, options?: RequestOptions): APIPromise<ChatKitUploadFileResponse> {
return this._client.post(
'/chatkit/files',
maybeMultipartFormRequestOptions(
{ body, ...options, headers: buildHeaders([{ 'OpenAI-Beta': 'chatkit_beta=v1' }, options?.headers]) },
this._client,
),
);
}
}

/**
Expand Down Expand Up @@ -100,97 +75,11 @@ export namespace ChatKitWorkflow {
}
}

/**
* Metadata for a non-image file uploaded through ChatKit.
*/
export interface FilePart {
/**
* Unique identifier for the uploaded file.
*/
id: string;

/**
* MIME type reported for the uploaded file. Defaults to null when unknown.
*/
mime_type: string | null;

/**
* Original filename supplied by the uploader. Defaults to null when unnamed.
*/
name: string | null;

/**
* Type discriminator that is always `file`.
*/
type: 'file';

/**
* Signed URL for downloading the uploaded file. Defaults to null when no download
* link is available.
*/
upload_url: string | null;
}

/**
* Metadata for an image uploaded through ChatKit.
*/
export interface ImagePart {
/**
* Unique identifier for the uploaded image.
*/
id: string;

/**
* MIME type of the uploaded image.
*/
mime_type: string;

/**
* Original filename for the uploaded image. Defaults to null when unnamed.
*/
name: string | null;

/**
* Preview URL that can be rendered inline for the image.
*/
preview_url: string;

/**
* Type discriminator that is always `image`.
*/
type: 'image';

/**
* Signed URL for downloading the uploaded image. Defaults to null when no download
* link is available.
*/
upload_url: string | null;
}

/**
* Represents either a file or image attachment.
*/
export type ChatKitUploadFileResponse = FilePart | ImagePart;

export interface ChatKitUploadFileParams {
/**
* Binary file contents to store with the ChatKit session. Supports PDFs and PNG,
* JPG, JPEG, GIF, or WEBP images.
*/
file: Uploadable;
}

ChatKit.Sessions = Sessions;
ChatKit.Threads = Threads;

export declare namespace ChatKit {
export {
type ChatKitWorkflow as ChatKitWorkflow,
type FilePart as FilePart,
type ImagePart as ImagePart,
type ChatKitUploadFileResponse as ChatKitUploadFileResponse,
type ChatKitUploadFileParams as ChatKitUploadFileParams,
};
export { type ChatKitWorkflow as ChatKitWorkflow };

export { Sessions as Sessions, type SessionCreateParams as SessionCreateParams };

Expand Down
9 changes: 1 addition & 8 deletions src/resources/beta/chatkit/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

export {
ChatKit,
type ChatKitWorkflow,
type FilePart,
type ImagePart,
type ChatKitUploadFileResponse,
type ChatKitUploadFileParams,
} from './chatkit';
export { ChatKit, type ChatKitWorkflow } from './chatkit';
export { Sessions, type SessionCreateParams } from './sessions';
export {
Threads,
Expand Down
9 changes: 1 addition & 8 deletions src/resources/beta/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,7 @@ export {
} from './assistants';
export { Beta } from './beta';
export { Realtime } from './realtime/index';
export {
ChatKit,
type ChatKitWorkflow,
type FilePart,
type ImagePart,
type ChatKitUploadFileResponse,
type ChatKitUploadFileParams,
} from './chatkit/index';
export { ChatKit, type ChatKitWorkflow } from './chatkit/index';
export {
Threads,
type AssistantResponseFormatOption,
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '6.4.0'; // x-release-please-version
export const VERSION = '6.5.0'; // x-release-please-version
29 changes: 0 additions & 29 deletions tests/api-resources/beta/chatkit/chatkit.test.ts

This file was deleted.

Loading