Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: 4.68.0 #1137

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 @@
{
".": "4.67.3"
".": "4.68.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 68
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-71e58a77027c67e003fdd1b1ac8ac11557d8bfabc7666d1a827c6b1ca8ab98b5.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-8729aaa35436531ab453224af10e67f89677db8f350f0346bb3537489edea649.yml
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 4.68.0 (2024-10-17)

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

### Features

* **api:** add gpt-4o-audio-preview model for chat completions ([#1135](https://github.com/openai/openai-node/issues/1135)) ([17a623f](https://github.com/openai/openai-node/commit/17a623f70050bca4538ad2939055cd9d9b165f89))

## 4.67.3 (2024-10-08)

Full Changelog: [v4.67.2...v4.67.3](https://github.com/openai/openai-node/compare/v4.67.2...v4.67.3)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.67.3/mod.ts';
import OpenAI from 'https://deno.land/x/openai@v4.68.0/mod.ts';
```

<!-- x-release-please-end -->
Expand Down
4 changes: 4 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,20 @@ Types:

- <code><a href="./src/resources/chat/completions.ts">ChatCompletion</a></code>
- <code><a href="./src/resources/chat/completions.ts">ChatCompletionAssistantMessageParam</a></code>
- <code><a href="./src/resources/chat/completions.ts">ChatCompletionAudio</a></code>
- <code><a href="./src/resources/chat/completions.ts">ChatCompletionAudioParam</a></code>
- <code><a href="./src/resources/chat/completions.ts">ChatCompletionChunk</a></code>
- <code><a href="./src/resources/chat/completions.ts">ChatCompletionContentPart</a></code>
- <code><a href="./src/resources/chat/completions.ts">ChatCompletionContentPartImage</a></code>
- <code><a href="./src/resources/chat/completions.ts">ChatCompletionContentPartInputAudio</a></code>
- <code><a href="./src/resources/chat/completions.ts">ChatCompletionContentPartRefusal</a></code>
- <code><a href="./src/resources/chat/completions.ts">ChatCompletionContentPartText</a></code>
- <code><a href="./src/resources/chat/completions.ts">ChatCompletionFunctionCallOption</a></code>
- <code><a href="./src/resources/chat/completions.ts">ChatCompletionFunctionMessageParam</a></code>
- <code><a href="./src/resources/chat/completions.ts">ChatCompletionMessage</a></code>
- <code><a href="./src/resources/chat/completions.ts">ChatCompletionMessageParam</a></code>
- <code><a href="./src/resources/chat/completions.ts">ChatCompletionMessageToolCall</a></code>
- <code><a href="./src/resources/chat/completions.ts">ChatCompletionModality</a></code>
- <code><a href="./src/resources/chat/completions.ts">ChatCompletionNamedToolChoice</a></code>
- <code><a href="./src/resources/chat/completions.ts">ChatCompletionRole</a></code>
- <code><a href="./src/resources/chat/completions.ts">ChatCompletionStreamOptions</a></code>
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": "4.67.3",
"version": "4.68.0",
"description": "The official TypeScript library for the OpenAI API",
"author": "OpenAI <[email protected]>",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-deno
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,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.67.3/mod.ts";
import OpenAI from "https://deno.land/x/openai@v4.68.0/mod.ts";

const client = new OpenAI();
\`\`\`
Expand Down
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,16 +250,20 @@ export namespace OpenAI {
export import ChatModel = API.ChatModel;
export import ChatCompletion = API.ChatCompletion;
export import ChatCompletionAssistantMessageParam = API.ChatCompletionAssistantMessageParam;
export import ChatCompletionAudio = API.ChatCompletionAudio;
export import ChatCompletionAudioParam = API.ChatCompletionAudioParam;
export import ChatCompletionChunk = API.ChatCompletionChunk;
export import ChatCompletionContentPart = API.ChatCompletionContentPart;
export import ChatCompletionContentPartImage = API.ChatCompletionContentPartImage;
export import ChatCompletionContentPartInputAudio = API.ChatCompletionContentPartInputAudio;
export import ChatCompletionContentPartRefusal = API.ChatCompletionContentPartRefusal;
export import ChatCompletionContentPartText = API.ChatCompletionContentPartText;
export import ChatCompletionFunctionCallOption = API.ChatCompletionFunctionCallOption;
export import ChatCompletionFunctionMessageParam = API.ChatCompletionFunctionMessageParam;
export import ChatCompletionMessage = API.ChatCompletionMessage;
export import ChatCompletionMessageParam = API.ChatCompletionMessageParam;
export import ChatCompletionMessageToolCall = API.ChatCompletionMessageToolCall;
export import ChatCompletionModality = API.ChatCompletionModality;
export import ChatCompletionNamedToolChoice = API.ChatCompletionNamedToolChoice;
export import ChatCompletionRole = API.ChatCompletionRole;
export import ChatCompletionStreamOptions = API.ChatCompletionStreamOptions;
Expand Down
4 changes: 3 additions & 1 deletion src/lib/AbstractChatCompletionRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ export class AbstractChatCompletionRunner<
const message = this.messages[i];
if (isAssistantMessage(message)) {
const { function_call, ...rest } = message;
const ret: ChatCompletionMessage = {

// TODO: support audio here
const ret: Omit<ChatCompletionMessage, 'audio'> = {
...rest,
content: (message as ChatCompletionMessage).content ?? null,
refusal: (message as ChatCompletionMessage).refusal ?? null,
Expand Down
10 changes: 10 additions & 0 deletions src/resources/beta/assistants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,11 @@ export namespace AssistantStreamEvent {
data: ThreadsAPI.Thread;

event: 'thread.created';

/**
* Whether to enable input audio transcription.
*/
enabled?: boolean;
}

/**
Expand Down Expand Up @@ -1084,6 +1089,11 @@ export interface ThreadStreamEvent {
data: ThreadsAPI.Thread;

event: 'thread.created';

/**
* Whether to enable input audio transcription.
*/
enabled?: boolean;
}

export interface AssistantCreateParams {
Expand Down
7 changes: 7 additions & 0 deletions src/resources/chat/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ export type ChatModel =
| 'gpt-4o'
| 'gpt-4o-2024-08-06'
| 'gpt-4o-2024-05-13'
| 'gpt-4o-realtime-preview'
| 'gpt-4o-realtime-preview-2024-10-01'
| 'gpt-4o-audio-preview'
| 'gpt-4o-audio-preview-2024-10-01'
| 'chatgpt-4o-latest'
| 'gpt-4o-mini'
| 'gpt-4o-mini-2024-07-18'
Expand Down Expand Up @@ -45,16 +48,20 @@ export namespace Chat {
export import Completions = CompletionsAPI.Completions;
export import ChatCompletion = CompletionsAPI.ChatCompletion;
export import ChatCompletionAssistantMessageParam = CompletionsAPI.ChatCompletionAssistantMessageParam;
export import ChatCompletionAudio = CompletionsAPI.ChatCompletionAudio;
export import ChatCompletionAudioParam = CompletionsAPI.ChatCompletionAudioParam;
export import ChatCompletionChunk = CompletionsAPI.ChatCompletionChunk;
export import ChatCompletionContentPart = CompletionsAPI.ChatCompletionContentPart;
export import ChatCompletionContentPartImage = CompletionsAPI.ChatCompletionContentPartImage;
export import ChatCompletionContentPartInputAudio = CompletionsAPI.ChatCompletionContentPartInputAudio;
export import ChatCompletionContentPartRefusal = CompletionsAPI.ChatCompletionContentPartRefusal;
export import ChatCompletionContentPartText = CompletionsAPI.ChatCompletionContentPartText;
export import ChatCompletionFunctionCallOption = CompletionsAPI.ChatCompletionFunctionCallOption;
export import ChatCompletionFunctionMessageParam = CompletionsAPI.ChatCompletionFunctionMessageParam;
export import ChatCompletionMessage = CompletionsAPI.ChatCompletionMessage;
export import ChatCompletionMessageParam = CompletionsAPI.ChatCompletionMessageParam;
export import ChatCompletionMessageToolCall = CompletionsAPI.ChatCompletionMessageToolCall;
export import ChatCompletionModality = CompletionsAPI.ChatCompletionModality;
export import ChatCompletionNamedToolChoice = CompletionsAPI.ChatCompletionNamedToolChoice;
export import ChatCompletionRole = CompletionsAPI.ChatCompletionRole;
export import ChatCompletionStreamOptions = CompletionsAPI.ChatCompletionStreamOptions;
Expand Down
Loading