Skip to content

Commit f20a9a1

Browse files
chore: add missing docstrings
1 parent 8f0d230 commit f20a9a1

File tree

509 files changed

+3202
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

509 files changed

+3202
-0
lines changed

src/openai/types/audio/transcription.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ class Logprob(BaseModel):
2121

2222

2323
class UsageTokensInputTokenDetails(BaseModel):
24+
"""Details about the input tokens billed for this request."""
25+
2426
audio_tokens: Optional[int] = None
2527
"""Number of audio tokens billed for this request."""
2628

@@ -29,6 +31,8 @@ class UsageTokensInputTokenDetails(BaseModel):
2931

3032

3133
class UsageTokens(BaseModel):
34+
"""Usage statistics for models billed by token usage."""
35+
3236
input_tokens: int
3337
"""Number of input tokens billed for this request."""
3438

@@ -46,6 +50,8 @@ class UsageTokens(BaseModel):
4650

4751

4852
class UsageDuration(BaseModel):
53+
"""Usage statistics for models billed by audio input duration."""
54+
4955
seconds: float
5056
"""Duration of the input audio in seconds."""
5157

@@ -57,6 +63,10 @@ class UsageDuration(BaseModel):
5763

5864

5965
class Transcription(BaseModel):
66+
"""
67+
Represents a transcription response returned by model, based on the provided input.
68+
"""
69+
6070
text: str
6171
"""The transcribed text."""
6272

src/openai/types/audio/transcription_diarized.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212

1313
class UsageTokensInputTokenDetails(BaseModel):
14+
"""Details about the input tokens billed for this request."""
15+
1416
audio_tokens: Optional[int] = None
1517
"""Number of audio tokens billed for this request."""
1618

@@ -19,6 +21,8 @@ class UsageTokensInputTokenDetails(BaseModel):
1921

2022

2123
class UsageTokens(BaseModel):
24+
"""Usage statistics for models billed by token usage."""
25+
2226
input_tokens: int
2327
"""Number of input tokens billed for this request."""
2428

@@ -36,6 +40,8 @@ class UsageTokens(BaseModel):
3640

3741

3842
class UsageDuration(BaseModel):
43+
"""Usage statistics for models billed by audio input duration."""
44+
3945
seconds: float
4046
"""Duration of the input audio in seconds."""
4147

@@ -47,6 +53,10 @@ class UsageDuration(BaseModel):
4753

4854

4955
class TranscriptionDiarized(BaseModel):
56+
"""
57+
Represents a diarized transcription response returned by the model, including the combined transcript and speaker-segment annotations.
58+
"""
59+
5060
duration: float
5161
"""Duration of the input audio in seconds."""
5262

src/openai/types/audio/transcription_diarized_segment.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99

1010
class TranscriptionDiarizedSegment(BaseModel):
11+
"""A segment of diarized transcript text with speaker metadata."""
12+
1113
id: str
1214
"""Unique identifier for the segment."""
1315

src/openai/types/audio/transcription_text_delta_event.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ class Logprob(BaseModel):
2020

2121

2222
class TranscriptionTextDeltaEvent(BaseModel):
23+
"""Emitted when there is an additional text delta.
24+
25+
This is also the first event emitted when the transcription starts. Only emitted when you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the `Stream` parameter set to `true`.
26+
"""
27+
2328
delta: str
2429
"""The text delta that was additionally transcribed."""
2530

src/openai/types/audio/transcription_text_done_event.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ class Logprob(BaseModel):
2020

2121

2222
class UsageInputTokenDetails(BaseModel):
23+
"""Details about the input tokens billed for this request."""
24+
2325
audio_tokens: Optional[int] = None
2426
"""Number of audio tokens billed for this request."""
2527

@@ -28,6 +30,8 @@ class UsageInputTokenDetails(BaseModel):
2830

2931

3032
class Usage(BaseModel):
33+
"""Usage statistics for models billed by token usage."""
34+
3135
input_tokens: int
3236
"""Number of input tokens billed for this request."""
3337

@@ -45,6 +49,11 @@ class Usage(BaseModel):
4549

4650

4751
class TranscriptionTextDoneEvent(BaseModel):
52+
"""Emitted when the transcription is complete.
53+
54+
Contains the complete transcription text. Only emitted when you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with the `Stream` parameter set to `true`.
55+
"""
56+
4857
text: str
4958
"""The text that was transcribed."""
5059

src/openai/types/audio/transcription_text_segment_event.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99

1010
class TranscriptionTextSegmentEvent(BaseModel):
11+
"""
12+
Emitted when a diarized transcription returns a completed segment with speaker information. Only emitted when you [create a transcription](https://platform.openai.com/docs/api-reference/audio/create-transcription) with `stream` set to `true` and `response_format` set to `diarized_json`.
13+
"""
14+
1115
id: str
1216
"""Unique identifier for the segment."""
1317

src/openai/types/audio/transcription_verbose.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212

1313
class Usage(BaseModel):
14+
"""Usage statistics for models billed by audio input duration."""
15+
1416
seconds: float
1517
"""Duration of the input audio in seconds."""
1618

@@ -19,6 +21,10 @@ class Usage(BaseModel):
1921

2022

2123
class TranscriptionVerbose(BaseModel):
24+
"""
25+
Represents a verbose json transcription response returned by model, based on the provided input.
26+
"""
27+
2228
duration: float
2329
"""The duration of the input audio."""
2430

src/openai/types/auto_file_chunking_strategy_param.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,10 @@
88

99

1010
class AutoFileChunkingStrategyParam(TypedDict, total=False):
11+
"""The default strategy.
12+
13+
This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.
14+
"""
15+
1116
type: Required[Literal["auto"]]
1217
"""Always `auto`."""

src/openai/types/batch_create_params.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ class BatchCreateParams(TypedDict, total=False):
5858

5959

6060
class OutputExpiresAfter(TypedDict, total=False):
61+
"""
62+
The expiration policy for the output and/or error file that are generated for a batch.
63+
"""
64+
6165
anchor: Required[Literal["created_at"]]
6266
"""Anchor timestamp after which the expiration policy applies.
6367

src/openai/types/batch_request_counts.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77

88
class BatchRequestCounts(BaseModel):
9+
"""The request counts for different statuses within the batch."""
10+
911
completed: int
1012
"""Number of requests that have been completed successfully."""
1113

0 commit comments

Comments
 (0)