Skip to content

release: 1.54.0 #1846

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

Merged
merged 3 commits into from
Nov 4, 2024
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 @@
{
".": "1.53.1"
".": "1.54.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-7b0a5d715d94f75ac7795bd4d2175a0e3243af9b935a86c273f371e45583140f.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-2f8ca92b9b1879fd535b685e4767338413fcd533d42f3baac13a9c41da3fce35.yml
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 1.54.0 (2024-11-04)

Full Changelog: [v1.53.1...v1.54.0](https://github.com/openai/openai-python/compare/v1.53.1...v1.54.0)

### Features

* **api:** add support for predicted outputs ([#1847](https://github.com/openai/openai-python/issues/1847)) ([42a4103](https://github.com/openai/openai-python/commit/42a410379a1b5f72424cc2e96dc6ddff22fd00be))
* **project:** drop support for Python 3.7 ([#1845](https://github.com/openai/openai-python/issues/1845)) ([0ed5b1a](https://github.com/openai/openai-python/commit/0ed5b1a9302ccf2f40c3c751cd777740a4749cda))

## 1.53.1 (2024-11-04)

Full Changelog: [v1.53.0...v1.53.1](https://github.com/openai/openai-python/compare/v1.53.0...v1.53.1)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![PyPI version](https://img.shields.io/pypi/v/openai.svg)](https://pypi.org/project/openai/)

The OpenAI Python library provides convenient access to the OpenAI REST API from any Python 3.7+
The OpenAI Python library provides convenient access to the OpenAI REST API from any Python 3.8+
application. The library includes type definitions for all request params and response fields,
and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).

Expand Down Expand Up @@ -712,7 +712,7 @@ print(openai.__version__)

## Requirements

Python 3.7 or higher.
Python 3.8 or higher.

## Contributing

Expand Down
3 changes: 2 additions & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ from openai.types.chat import (
ChatCompletionMessageToolCall,
ChatCompletionModality,
ChatCompletionNamedToolChoice,
ChatCompletionPredictionContent,
ChatCompletionRole,
ChatCompletionStreamOptions,
ChatCompletionSystemMessageParam,
Expand Down Expand Up @@ -93,7 +94,7 @@ Methods:

- <code title="post /files">client.files.<a href="./src/openai/resources/files.py">create</a>(\*\*<a href="src/openai/types/file_create_params.py">params</a>) -> <a href="./src/openai/types/file_object.py">FileObject</a></code>
- <code title="get /files/{file_id}">client.files.<a href="./src/openai/resources/files.py">retrieve</a>(file_id) -> <a href="./src/openai/types/file_object.py">FileObject</a></code>
- <code title="get /files">client.files.<a href="./src/openai/resources/files.py">list</a>(\*\*<a href="src/openai/types/file_list_params.py">params</a>) -> <a href="./src/openai/types/file_object.py">SyncPage[FileObject]</a></code>
- <code title="get /files">client.files.<a href="./src/openai/resources/files.py">list</a>(\*\*<a href="src/openai/types/file_list_params.py">params</a>) -> <a href="./src/openai/types/file_object.py">SyncCursorPage[FileObject]</a></code>
- <code title="delete /files/{file_id}">client.files.<a href="./src/openai/resources/files.py">delete</a>(file_id) -> <a href="./src/openai/types/file_deleted.py">FileDeleted</a></code>
- <code title="get /files/{file_id}/content">client.files.<a href="./src/openai/resources/files.py">content</a>(file_id) -> HttpxBinaryResponseContent</code>
- <code title="get /files/{file_id}/content">client.files.<a href="./src/openai/resources/files.py">retrieve_content</a>(file_id) -> str</code>
Expand Down
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "openai"
version = "1.53.1"
version = "1.54.0"
description = "The official Python library for the openai API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand All @@ -18,11 +18,10 @@ dependencies = [
"tqdm > 4",
"jiter>=0.4.0, <1",
]
requires-python = ">= 3.7.1"
requires-python = ">= 3.8"
classifiers = [
"Typing :: Typed",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down Expand Up @@ -150,7 +149,7 @@ filterwarnings = [
# there are a couple of flags that are still disabled by
# default in strict mode as they are experimental and niche.
typeCheckingMode = "strict"
pythonVersion = "3.7"
pythonVersion = "3.8"

exclude = [
"_dev",
Expand Down
2 changes: 1 addition & 1 deletion src/openai/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "openai"
__version__ = "1.53.1" # x-release-please-version
__version__ = "1.54.0" # x-release-please-version
8 changes: 4 additions & 4 deletions src/openai/resources/audio/speech.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ def create(
input: The text to generate audio for. The maximum length is 4096 characters.

model:
One of the available [TTS models](https://platform.openai.com/docs/models/tts):
One of the available [TTS models](https://platform.openai.com/docs/models#tts):
`tts-1` or `tts-1-hd`

voice: The voice to use when generating the audio. Supported voices are `alloy`,
`echo`, `fable`, `onyx`, `nova`, and `shimmer`. Previews of the voices are
available in the
[Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech/voice-options).
[Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).

response_format: The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`,
`wav`, and `pcm`.
Expand Down Expand Up @@ -154,13 +154,13 @@ async def create(
input: The text to generate audio for. The maximum length is 4096 characters.

model:
One of the available [TTS models](https://platform.openai.com/docs/models/tts):
One of the available [TTS models](https://platform.openai.com/docs/models#tts):
`tts-1` or `tts-1-hd`

voice: The voice to use when generating the audio. Supported voices are `alloy`,
`echo`, `fable`, `onyx`, `nova`, and `shimmer`. Previews of the voices are
available in the
[Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech/voice-options).
[Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).

response_format: The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`,
`wav`, and `pcm`.
Expand Down
4 changes: 2 additions & 2 deletions src/openai/resources/audio/transcriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def create(

prompt: An optional text to guide the model's style or continue a previous audio
segment. The
[prompt](https://platform.openai.com/docs/guides/speech-to-text/prompting)
[prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting)
should match the audio language.

response_format: The format of the output, in one of these options: `json`, `text`, `srt`,
Expand Down Expand Up @@ -307,7 +307,7 @@ async def create(

prompt: An optional text to guide the model's style or continue a previous audio
segment. The
[prompt](https://platform.openai.com/docs/guides/speech-to-text/prompting)
[prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting)
should match the audio language.

response_format: The format of the output, in one of these options: `json`, `text`, `srt`,
Expand Down
4 changes: 2 additions & 2 deletions src/openai/resources/audio/translations.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def create(

prompt: An optional text to guide the model's style or continue a previous audio
segment. The
[prompt](https://platform.openai.com/docs/guides/speech-to-text/prompting)
[prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting)
should be in English.

response_format: The format of the output, in one of these options: `json`, `text`, `srt`,
Expand Down Expand Up @@ -273,7 +273,7 @@ async def create(

prompt: An optional text to guide the model's style or continue a previous audio
segment. The
[prompt](https://platform.openai.com/docs/guides/speech-to-text/prompting)
[prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting)
should be in English.

response_format: The format of the output, in one of these options: `json`, `text`, `srt`,
Expand Down
40 changes: 20 additions & 20 deletions src/openai/resources/beta/assistants.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ def create(
model: ID of the model to use. You can use the
[List models](https://platform.openai.com/docs/api-reference/models/list) API to
see all of your available models, or see our
[Model overview](https://platform.openai.com/docs/models/overview) for
descriptions of them.
[Model overview](https://platform.openai.com/docs/models) for descriptions of
them.

description: The description of the assistant. The maximum length is 512 characters.

Expand All @@ -95,8 +95,8 @@ def create(
name: The name of the assistant. The maximum length is 256 characters.

response_format: Specifies the format that the model must output. Compatible with
[GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
[GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
[GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
[GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4),
and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.

Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
Expand Down Expand Up @@ -239,14 +239,14 @@ def update(
model: ID of the model to use. You can use the
[List models](https://platform.openai.com/docs/api-reference/models/list) API to
see all of your available models, or see our
[Model overview](https://platform.openai.com/docs/models/overview) for
descriptions of them.
[Model overview](https://platform.openai.com/docs/models) for descriptions of
them.

name: The name of the assistant. The maximum length is 256 characters.

response_format: Specifies the format that the model must output. Compatible with
[GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
[GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
[GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
[GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4),
and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.

Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
Expand Down Expand Up @@ -344,8 +344,8 @@ def list(

before: A cursor for use in pagination. `before` is an object ID that defines your place
in the list. For instance, if you make a list request and receive 100 objects,
ending with obj_foo, your subsequent call can include before=obj_foo in order to
fetch the previous page of the list.
starting with obj_foo, your subsequent call can include before=obj_foo in order
to fetch the previous page of the list.

limit: A limit on the number of objects to be returned. Limit can range between 1 and
100, and the default is 20.
Expand Down Expand Up @@ -465,8 +465,8 @@ async def create(
model: ID of the model to use. You can use the
[List models](https://platform.openai.com/docs/api-reference/models/list) API to
see all of your available models, or see our
[Model overview](https://platform.openai.com/docs/models/overview) for
descriptions of them.
[Model overview](https://platform.openai.com/docs/models) for descriptions of
them.

description: The description of the assistant. The maximum length is 512 characters.

Expand All @@ -481,8 +481,8 @@ async def create(
name: The name of the assistant. The maximum length is 256 characters.

response_format: Specifies the format that the model must output. Compatible with
[GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
[GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
[GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
[GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4),
and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.

Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
Expand Down Expand Up @@ -625,14 +625,14 @@ async def update(
model: ID of the model to use. You can use the
[List models](https://platform.openai.com/docs/api-reference/models/list) API to
see all of your available models, or see our
[Model overview](https://platform.openai.com/docs/models/overview) for
descriptions of them.
[Model overview](https://platform.openai.com/docs/models) for descriptions of
them.

name: The name of the assistant. The maximum length is 256 characters.

response_format: Specifies the format that the model must output. Compatible with
[GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
[GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
[GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
[GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4),
and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.

Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
Expand Down Expand Up @@ -730,8 +730,8 @@ def list(

before: A cursor for use in pagination. `before` is an object ID that defines your place
in the list. For instance, if you make a list request and receive 100 objects,
ending with obj_foo, your subsequent call can include before=obj_foo in order to
fetch the previous page of the list.
starting with obj_foo, your subsequent call can include before=obj_foo in order
to fetch the previous page of the list.

limit: A limit on the number of objects to be returned. Limit can range between 1 and
100, and the default is 20.
Expand Down
8 changes: 4 additions & 4 deletions src/openai/resources/beta/threads/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ def list(

before: A cursor for use in pagination. `before` is an object ID that defines your place
in the list. For instance, if you make a list request and receive 100 objects,
ending with obj_foo, your subsequent call can include before=obj_foo in order to
fetch the previous page of the list.
starting with obj_foo, your subsequent call can include before=obj_foo in order
to fetch the previous page of the list.

limit: A limit on the number of objects to be returned. Limit can range between 1 and
100, and the default is 20.
Expand Down Expand Up @@ -495,8 +495,8 @@ def list(

before: A cursor for use in pagination. `before` is an object ID that defines your place
in the list. For instance, if you make a list request and receive 100 objects,
ending with obj_foo, your subsequent call can include before=obj_foo in order to
fetch the previous page of the list.
starting with obj_foo, your subsequent call can include before=obj_foo in order
to fetch the previous page of the list.

limit: A limit on the number of objects to be returned. Limit can range between 1 and
100, and the default is 20.
Expand Down
Loading
Loading