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 @@
{
".": "5.20.3"
".": "5.21.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 118
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-d30ff992a48873c1466c49f3c01f2ec8933faebff23424748f8d056065b1bcef.yml
openapi_spec_hash: e933ec43b46f45c348adb78840e5808d
config_hash: bf45940f0a7805b4ec2017eecdd36893
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-380330a93b5d010391ca3b36ea193c5353b0dfdf2ddd02789ef84a84ce427e82.yml
openapi_spec_hash: 859703234259ecdd2a3c6f4de88eb504
config_hash: b619b45c1e7facf819f902dee8fa4f97
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 5.21.0 (2025-09-17)

Full Changelog: [v5.20.3...v5.21.0](https://github.com/openai/openai-node/compare/v5.20.3...v5.21.0)

### Features

* **api:** type updates for conversations, reasoning_effort and results for evals ([f243f54](https://github.com/openai/openai-node/commit/f243f54072d00cb8d83b8c6093accaaabf34d4cf))

## 5.20.3 (2025-09-15)

Full Changelog: [v5.20.2...v5.20.3](https://github.com/openai/openai-node/compare/v5.20.2...v5.20.3)
Expand Down
15 changes: 5 additions & 10 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -896,22 +896,17 @@ Methods:
Types:

- <code><a href="./src/resources/conversations/conversations.ts">ComputerScreenshotContent</a></code>
- <code><a href="./src/resources/conversations/conversations.ts">ContainerFileCitationBody</a></code>
- <code><a href="./src/resources/conversations/conversations.ts">Conversation</a></code>
- <code><a href="./src/resources/conversations/conversations.ts">ConversationDeleted</a></code>
- <code><a href="./src/resources/conversations/conversations.ts">ConversationDeletedResource</a></code>
- <code><a href="./src/resources/conversations/conversations.ts">FileCitationBody</a></code>
- <code><a href="./src/resources/conversations/conversations.ts">InputFileContent</a></code>
- <code><a href="./src/resources/conversations/conversations.ts">InputImageContent</a></code>
- <code><a href="./src/resources/conversations/conversations.ts">InputTextContent</a></code>
- <code><a href="./src/resources/conversations/conversations.ts">LobProb</a></code>
- <code><a href="./src/resources/conversations/conversations.ts">Message</a></code>
- <code><a href="./src/resources/conversations/conversations.ts">OutputTextContent</a></code>
- <code><a href="./src/resources/conversations/conversations.ts">RefusalContent</a></code>
- <code><a href="./src/resources/conversations/conversations.ts">SummaryTextContent</a></code>
- <code><a href="./src/resources/conversations/conversations.ts">TextContent</a></code>
- <code><a href="./src/resources/conversations/conversations.ts">TopLogProb</a></code>
- <code><a href="./src/resources/conversations/conversations.ts">URLCitationBody</a></code>
- <code><a href="./src/resources/conversations/conversations.ts">InputTextContent</a></code>
- <code><a href="./src/resources/conversations/conversations.ts">OutputTextContent</a></code>
- <code><a href="./src/resources/conversations/conversations.ts">RefusalContent</a></code>
- <code><a href="./src/resources/conversations/conversations.ts">InputImageContent</a></code>
- <code><a href="./src/resources/conversations/conversations.ts">InputFileContent</a></code>

Methods:

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": "5.20.3",
"version": "5.21.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": "5.20.3",
"version": "5.21.0",
"description": "The official TypeScript library for the OpenAI API",
"author": "OpenAI <[email protected]>",
"types": "dist/index.d.ts",
Expand Down
225 changes: 27 additions & 198 deletions src/resources/conversations/conversations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ export class Conversations extends APIResource {
}
}

/**
* A screenshot of a computer.
*/
export interface ComputerScreenshotContent {
/**
* The identifier of an uploaded file that contains the screenshot.
Expand All @@ -72,38 +75,6 @@ export interface ComputerScreenshotContent {
type: 'computer_screenshot';
}

export interface ContainerFileCitationBody {
/**
* The ID of the container file.
*/
container_id: string;

/**
* The index of the last character of the container file citation in the message.
*/
end_index: number;

/**
* The ID of the file.
*/
file_id: string;

/**
* The filename of the container file cited.
*/
filename: string;

/**
* The index of the first character of the container file citation in the message.
*/
start_index: number;

/**
* The type of the container file citation. Always `container_file_citation`.
*/
type: 'container_file_citation';
}

export interface Conversation {
/**
* The unique ID of the conversation.
Expand Down Expand Up @@ -147,96 +118,9 @@ export interface ConversationDeletedResource {
object: 'conversation.deleted';
}

export interface FileCitationBody {
/**
* The ID of the file.
*/
file_id: string;

/**
* The filename of the file cited.
*/
filename: string;

/**
* The index of the file in the list of files.
*/
index: number;

/**
* The type of the file citation. Always `file_citation`.
*/
type: 'file_citation';
}

export interface InputFileContent {
/**
* The ID of the file to be sent to the model.
*/
file_id: string | null;

/**
* The type of the input item. Always `input_file`.
*/
type: 'input_file';

/**
* The URL of the file to be sent to the model.
*/
file_url?: string;

/**
* The name of the file to be sent to the model.
*/
filename?: string;
}

export interface InputImageContent {
/**
* The detail level of the image to be sent to the model. One of `high`, `low`, or
* `auto`. Defaults to `auto`.
*/
detail: 'low' | 'high' | 'auto';

/**
* The ID of the file to be sent to the model.
*/
file_id: string | null;

/**
* The URL of the image to be sent to the model. A fully qualified URL or base64
* encoded image in a data URL.
*/
image_url: string | null;

/**
* The type of the input item. Always `input_image`.
*/
type: 'input_image';
}

export interface InputTextContent {
/**
* The text input to the model.
*/
text: string;

/**
* The type of the input item. Always `input_text`.
*/
type: 'input_text';
}

export interface LobProb {
token: string;

bytes: Array<number>;

logprob: number;

top_logprobs: Array<TopLogProb>;
}

/**
* A message to or from the model.
*/
export interface Message {
/**
* The unique ID of the message.
Expand All @@ -247,14 +131,14 @@ export interface Message {
* The content of the message
*/
content: Array<
| InputTextContent
| OutputTextContent
| ResponsesAPI.ResponseInputText
| ResponsesAPI.ResponseOutputText
| TextContent
| SummaryTextContent
| RefusalContent
| InputImageContent
| ResponsesAPI.ResponseOutputRefusal
| ResponsesAPI.ResponseInputImage
| ComputerScreenshotContent
| InputFileContent
| ResponsesAPI.ResponseInputFile
>;

/**
Expand All @@ -275,83 +159,33 @@ export interface Message {
type: 'message';
}

export interface OutputTextContent {
/**
* The annotations of the text output.
*/
annotations: Array<FileCitationBody | URLCitationBody | ContainerFileCitationBody>;

/**
* The text output from the model.
*/
text: string;

/**
* The type of the output text. Always `output_text`.
*/
type: 'output_text';

logprobs?: Array<LobProb>;
}

export interface RefusalContent {
/**
* The refusal explanation from the model.
*/
refusal: string;

/**
* The type of the refusal. Always `refusal`.
*/
type: 'refusal';
}

/**
* A summary text from the model.
*/
export interface SummaryTextContent {
text: string;

type: 'summary_text';
}

/**
* A text content.
*/
export interface TextContent {
text: string;

type: 'text';
}

export interface TopLogProb {
token: string;
export type InputTextContent = ResponsesAPI.ResponseInputText;

bytes: Array<number>;
export type OutputTextContent = ResponsesAPI.ResponseOutputText;

logprob: number;
}
export type RefusalContent = ResponsesAPI.ResponseOutputRefusal;

export interface URLCitationBody {
/**
* The index of the last character of the URL citation in the message.
*/
end_index: number;
export type InputImageContent = ResponsesAPI.ResponseInputImage;

/**
* The index of the first character of the URL citation in the message.
*/
start_index: number;

/**
* The title of the web resource.
*/
title: string;

/**
* The type of the URL citation. Always `url_citation`.
*/
type: 'url_citation';

/**
* The URL of the web resource.
*/
url: string;
}
export type InputFileContent = ResponsesAPI.ResponseInputFile;

export interface ConversationCreateParams {
/**
Expand Down Expand Up @@ -387,22 +221,17 @@ Conversations.Items = Items;
export declare namespace Conversations {
export {
type ComputerScreenshotContent as ComputerScreenshotContent,
type ContainerFileCitationBody as ContainerFileCitationBody,
type Conversation as Conversation,
type ConversationDeleted as ConversationDeleted,
type ConversationDeletedResource as ConversationDeletedResource,
type FileCitationBody as FileCitationBody,
type InputFileContent as InputFileContent,
type InputImageContent as InputImageContent,
type InputTextContent as InputTextContent,
type LobProb as LobProb,
type Message as Message,
type OutputTextContent as OutputTextContent,
type RefusalContent as RefusalContent,
type SummaryTextContent as SummaryTextContent,
type TextContent as TextContent,
type TopLogProb as TopLogProb,
type URLCitationBody as URLCitationBody,
type InputTextContent as InputTextContent,
type OutputTextContent as OutputTextContent,
type RefusalContent as RefusalContent,
type InputImageContent as InputImageContent,
type InputFileContent as InputFileContent,
type ConversationCreateParams as ConversationCreateParams,
type ConversationUpdateParams as ConversationUpdateParams,
};
Expand Down
Loading