Skip to content

Commit db5c350

Browse files
release: 1.95.0 (#2456)
* chore(readme): fix version rendering on pypi * feat(api): add file_url, fix event ID * release: 1.95.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 4d5fe48 commit db5c350

17 files changed

+99
-20
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.94.0"
2+
".": "1.95.0"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 111
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-a473967d1766dc155994d932fbc4a5bcbd1c140a37c20d0a4065e1bf0640536d.yml
3-
openapi_spec_hash: 67cdc62b0d6c8b1de29b7dc54b265749
4-
config_hash: 7b53f96f897ca1b3407a5341a6f820db
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-2d116cda53321baa3479e628512def723207a81eb1cdaebb542bd0555e563bda.yml
3+
openapi_spec_hash: 809d958fec261a32004a4b026b718793
4+
config_hash: e74d6791681e3af1b548748ff47a22c2

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## 1.95.0 (2025-07-10)
4+
5+
Full Changelog: [v1.94.0...v1.95.0](https://github.com/openai/openai-python/compare/v1.94.0...v1.95.0)
6+
7+
### Features
8+
9+
* **api:** add file_url, fix event ID ([265e216](https://github.com/openai/openai-python/commit/265e216396196d66cdfb5f92c5ef1a2a6ff27b5b))
10+
11+
12+
### Chores
13+
14+
* **readme:** fix version rendering on pypi ([1eee5ca](https://github.com/openai/openai-python/commit/1eee5cabf2fd93877cd3ba85d0c6ed2ffd5f159f))
15+
316
## 1.94.0 (2025-07-10)
417

518
Full Changelog: [v1.93.3...v1.94.0](https://github.com/openai/openai-python/compare/v1.93.3...v1.94.0)

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# OpenAI Python API library
22

3-
[![PyPI version](<https://img.shields.io/pypi/v/openai.svg?label=pypi%20(stable)>)](https://pypi.org/project/openai/)
3+
<!-- prettier-ignore -->
4+
[![PyPI version](https://img.shields.io/pypi/v/openai.svg?label=pypi%20(stable))](https://pypi.org/project/openai/)
45

56
The OpenAI Python library provides convenient access to the OpenAI REST API from any Python 3.8+
67
application. The library includes type definitions for all request params and response fields,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "openai"
3-
version = "1.94.0"
3+
version = "1.95.0"
44
description = "The official Python library for the openai API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/openai/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "openai"
4-
__version__ = "1.94.0" # x-release-please-version
4+
__version__ = "1.95.0" # x-release-please-version

src/openai/types/audio/transcription.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class UsageTokens(BaseModel):
4646

4747

4848
class UsageDuration(BaseModel):
49-
duration: float
49+
seconds: float
5050
"""Duration of the input audio in seconds."""
5151

5252
type: Literal["duration"]

src/openai/types/audio/transcription_verbose.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313
class Usage(BaseModel):
14-
duration: float
14+
seconds: float
1515
"""Duration of the input audio in seconds."""
1616

1717
type: Literal["duration"]

src/openai/types/beta/realtime/conversation_item_input_audio_transcription_completed_event.py

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,54 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import List, Optional
4-
from typing_extensions import Literal
3+
from typing import List, Union, Optional
4+
from typing_extensions import Literal, TypeAlias
55

66
from ...._models import BaseModel
77

8-
__all__ = ["ConversationItemInputAudioTranscriptionCompletedEvent", "Logprob"]
8+
__all__ = [
9+
"ConversationItemInputAudioTranscriptionCompletedEvent",
10+
"Usage",
11+
"UsageTranscriptTextUsageTokens",
12+
"UsageTranscriptTextUsageTokensInputTokenDetails",
13+
"UsageTranscriptTextUsageDuration",
14+
"Logprob",
15+
]
16+
17+
18+
class UsageTranscriptTextUsageTokensInputTokenDetails(BaseModel):
19+
audio_tokens: Optional[int] = None
20+
"""Number of audio tokens billed for this request."""
21+
22+
text_tokens: Optional[int] = None
23+
"""Number of text tokens billed for this request."""
24+
25+
26+
class UsageTranscriptTextUsageTokens(BaseModel):
27+
input_tokens: int
28+
"""Number of input tokens billed for this request."""
29+
30+
output_tokens: int
31+
"""Number of output tokens generated."""
32+
33+
total_tokens: int
34+
"""Total number of tokens used (input + output)."""
35+
36+
type: Literal["tokens"]
37+
"""The type of the usage object. Always `tokens` for this variant."""
38+
39+
input_token_details: Optional[UsageTranscriptTextUsageTokensInputTokenDetails] = None
40+
"""Details about the input tokens billed for this request."""
41+
42+
43+
class UsageTranscriptTextUsageDuration(BaseModel):
44+
seconds: float
45+
"""Duration of the input audio in seconds."""
46+
47+
type: Literal["duration"]
48+
"""The type of the usage object. Always `duration` for this variant."""
49+
50+
51+
Usage: TypeAlias = Union[UsageTranscriptTextUsageTokens, UsageTranscriptTextUsageDuration]
952

1053

1154
class Logprob(BaseModel):
@@ -37,5 +80,8 @@ class ConversationItemInputAudioTranscriptionCompletedEvent(BaseModel):
3780
The event type, must be `conversation.item.input_audio_transcription.completed`.
3881
"""
3982

83+
usage: Usage
84+
"""Usage statistics for the transcription."""
85+
4086
logprobs: Optional[List[Logprob]] = None
4187
"""The log probabilities of the transcription."""

src/openai/types/file_object.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,19 @@ class FileObject(BaseModel):
2525
"""The object type, which is always `file`."""
2626

2727
purpose: Literal[
28-
"assistants", "assistants_output", "batch", "batch_output", "fine-tune", "fine-tune-results", "vision"
28+
"assistants",
29+
"assistants_output",
30+
"batch",
31+
"batch_output",
32+
"fine-tune",
33+
"fine-tune-results",
34+
"vision",
35+
"user_data",
2936
]
3037
"""The intended purpose of the file.
3138
3239
Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`,
33-
`fine-tune`, `fine-tune-results` and `vision`.
40+
`fine-tune`, `fine-tune-results`, `vision`, and `user_data`.
3441
"""
3542

3643
status: Literal["uploaded", "processed", "error"]

0 commit comments

Comments
 (0)