Skip to content

Commit 1d2a19b

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
chore: add docstrings to raw response properties (#1696)
1 parent 05eec8a commit 1d2a19b

27 files changed

+594
-0
lines changed

src/openai/resources/audio/audio.py

+22
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,21 @@ def speech(self) -> Speech:
4747

4848
@cached_property
4949
def with_raw_response(self) -> AudioWithRawResponse:
50+
"""
51+
This property can be used as a prefix for any HTTP method call to return the
52+
the raw response object instead of the parsed content.
53+
54+
For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
55+
"""
5056
return AudioWithRawResponse(self)
5157

5258
@cached_property
5359
def with_streaming_response(self) -> AudioWithStreamingResponse:
60+
"""
61+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
62+
63+
For more information, see https://www.github.com/openai/openai-python#with_streaming_response
64+
"""
5465
return AudioWithStreamingResponse(self)
5566

5667

@@ -69,10 +80,21 @@ def speech(self) -> AsyncSpeech:
6980

7081
@cached_property
7182
def with_raw_response(self) -> AsyncAudioWithRawResponse:
83+
"""
84+
This property can be used as a prefix for any HTTP method call to return the
85+
the raw response object instead of the parsed content.
86+
87+
For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
88+
"""
7289
return AsyncAudioWithRawResponse(self)
7390

7491
@cached_property
7592
def with_streaming_response(self) -> AsyncAudioWithStreamingResponse:
93+
"""
94+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
95+
96+
For more information, see https://www.github.com/openai/openai-python#with_streaming_response
97+
"""
7698
return AsyncAudioWithStreamingResponse(self)
7799

78100

src/openai/resources/audio/speech.py

+22
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,21 @@
3131
class Speech(SyncAPIResource):
3232
@cached_property
3333
def with_raw_response(self) -> SpeechWithRawResponse:
34+
"""
35+
This property can be used as a prefix for any HTTP method call to return the
36+
the raw response object instead of the parsed content.
37+
38+
For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
39+
"""
3440
return SpeechWithRawResponse(self)
3541

3642
@cached_property
3743
def with_streaming_response(self) -> SpeechWithStreamingResponse:
44+
"""
45+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
46+
47+
For more information, see https://www.github.com/openai/openai-python#with_streaming_response
48+
"""
3849
return SpeechWithStreamingResponse(self)
3950

4051
def create(
@@ -104,10 +115,21 @@ def create(
104115
class AsyncSpeech(AsyncAPIResource):
105116
@cached_property
106117
def with_raw_response(self) -> AsyncSpeechWithRawResponse:
118+
"""
119+
This property can be used as a prefix for any HTTP method call to return the
120+
the raw response object instead of the parsed content.
121+
122+
For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
123+
"""
107124
return AsyncSpeechWithRawResponse(self)
108125

109126
@cached_property
110127
def with_streaming_response(self) -> AsyncSpeechWithStreamingResponse:
128+
"""
129+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
130+
131+
For more information, see https://www.github.com/openai/openai-python#with_streaming_response
132+
"""
111133
return AsyncSpeechWithStreamingResponse(self)
112134

113135
async def create(

src/openai/resources/audio/transcriptions.py

+22
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,21 @@
2929
class Transcriptions(SyncAPIResource):
3030
@cached_property
3131
def with_raw_response(self) -> TranscriptionsWithRawResponse:
32+
"""
33+
This property can be used as a prefix for any HTTP method call to return the
34+
the raw response object instead of the parsed content.
35+
36+
For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
37+
"""
3238
return TranscriptionsWithRawResponse(self)
3339

3440
@cached_property
3541
def with_streaming_response(self) -> TranscriptionsWithStreamingResponse:
42+
"""
43+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
44+
45+
For more information, see https://www.github.com/openai/openai-python#with_streaming_response
46+
"""
3647
return TranscriptionsWithStreamingResponse(self)
3748

3849
def create(
@@ -125,10 +136,21 @@ def create(
125136
class AsyncTranscriptions(AsyncAPIResource):
126137
@cached_property
127138
def with_raw_response(self) -> AsyncTranscriptionsWithRawResponse:
139+
"""
140+
This property can be used as a prefix for any HTTP method call to return the
141+
the raw response object instead of the parsed content.
142+
143+
For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
144+
"""
128145
return AsyncTranscriptionsWithRawResponse(self)
129146

130147
@cached_property
131148
def with_streaming_response(self) -> AsyncTranscriptionsWithStreamingResponse:
149+
"""
150+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
151+
152+
For more information, see https://www.github.com/openai/openai-python#with_streaming_response
153+
"""
132154
return AsyncTranscriptionsWithStreamingResponse(self)
133155

134156
async def create(

src/openai/resources/audio/translations.py

+22
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,21 @@
2828
class Translations(SyncAPIResource):
2929
@cached_property
3030
def with_raw_response(self) -> TranslationsWithRawResponse:
31+
"""
32+
This property can be used as a prefix for any HTTP method call to return the
33+
the raw response object instead of the parsed content.
34+
35+
For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
36+
"""
3137
return TranslationsWithRawResponse(self)
3238

3339
@cached_property
3440
def with_streaming_response(self) -> TranslationsWithStreamingResponse:
41+
"""
42+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
43+
44+
For more information, see https://www.github.com/openai/openai-python#with_streaming_response
45+
"""
3546
return TranslationsWithStreamingResponse(self)
3647

3748
def create(
@@ -109,10 +120,21 @@ def create(
109120
class AsyncTranslations(AsyncAPIResource):
110121
@cached_property
111122
def with_raw_response(self) -> AsyncTranslationsWithRawResponse:
123+
"""
124+
This property can be used as a prefix for any HTTP method call to return the
125+
the raw response object instead of the parsed content.
126+
127+
For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
128+
"""
112129
return AsyncTranslationsWithRawResponse(self)
113130

114131
@cached_property
115132
def with_streaming_response(self) -> AsyncTranslationsWithStreamingResponse:
133+
"""
134+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
135+
136+
For more information, see https://www.github.com/openai/openai-python#with_streaming_response
137+
"""
116138
return AsyncTranslationsWithStreamingResponse(self)
117139

118140
async def create(

src/openai/resources/batches.py

+22
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,21 @@
3030
class Batches(SyncAPIResource):
3131
@cached_property
3232
def with_raw_response(self) -> BatchesWithRawResponse:
33+
"""
34+
This property can be used as a prefix for any HTTP method call to return the
35+
the raw response object instead of the parsed content.
36+
37+
For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
38+
"""
3339
return BatchesWithRawResponse(self)
3440

3541
@cached_property
3642
def with_streaming_response(self) -> BatchesWithStreamingResponse:
43+
"""
44+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
45+
46+
For more information, see https://www.github.com/openai/openai-python#with_streaming_response
47+
"""
3748
return BatchesWithStreamingResponse(self)
3849

3950
def create(
@@ -224,10 +235,21 @@ def cancel(
224235
class AsyncBatches(AsyncAPIResource):
225236
@cached_property
226237
def with_raw_response(self) -> AsyncBatchesWithRawResponse:
238+
"""
239+
This property can be used as a prefix for any HTTP method call to return the
240+
the raw response object instead of the parsed content.
241+
242+
For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
243+
"""
227244
return AsyncBatchesWithRawResponse(self)
228245

229246
@cached_property
230247
def with_streaming_response(self) -> AsyncBatchesWithStreamingResponse:
248+
"""
249+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
250+
251+
For more information, see https://www.github.com/openai/openai-python#with_streaming_response
252+
"""
231253
return AsyncBatchesWithStreamingResponse(self)
232254

233255
async def create(

src/openai/resources/beta/assistants.py

+22
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,21 @@
3535
class Assistants(SyncAPIResource):
3636
@cached_property
3737
def with_raw_response(self) -> AssistantsWithRawResponse:
38+
"""
39+
This property can be used as a prefix for any HTTP method call to return the
40+
the raw response object instead of the parsed content.
41+
42+
For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
43+
"""
3844
return AssistantsWithRawResponse(self)
3945

4046
@cached_property
4147
def with_streaming_response(self) -> AssistantsWithStreamingResponse:
48+
"""
49+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
50+
51+
For more information, see https://www.github.com/openai/openai-python#with_streaming_response
52+
"""
4253
return AssistantsWithStreamingResponse(self)
4354

4455
def create(
@@ -410,10 +421,21 @@ def delete(
410421
class AsyncAssistants(AsyncAPIResource):
411422
@cached_property
412423
def with_raw_response(self) -> AsyncAssistantsWithRawResponse:
424+
"""
425+
This property can be used as a prefix for any HTTP method call to return the
426+
the raw response object instead of the parsed content.
427+
428+
For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
429+
"""
413430
return AsyncAssistantsWithRawResponse(self)
414431

415432
@cached_property
416433
def with_streaming_response(self) -> AsyncAssistantsWithStreamingResponse:
434+
"""
435+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
436+
437+
For more information, see https://www.github.com/openai/openai-python#with_streaming_response
438+
"""
417439
return AsyncAssistantsWithStreamingResponse(self)
418440

419441
async def create(

src/openai/resources/beta/beta.py

+22
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,21 @@ def threads(self) -> Threads:
5454

5555
@cached_property
5656
def with_raw_response(self) -> BetaWithRawResponse:
57+
"""
58+
This property can be used as a prefix for any HTTP method call to return the
59+
the raw response object instead of the parsed content.
60+
61+
For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
62+
"""
5763
return BetaWithRawResponse(self)
5864

5965
@cached_property
6066
def with_streaming_response(self) -> BetaWithStreamingResponse:
67+
"""
68+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
69+
70+
For more information, see https://www.github.com/openai/openai-python#with_streaming_response
71+
"""
6172
return BetaWithStreamingResponse(self)
6273

6374

@@ -80,10 +91,21 @@ def threads(self) -> AsyncThreads:
8091

8192
@cached_property
8293
def with_raw_response(self) -> AsyncBetaWithRawResponse:
94+
"""
95+
This property can be used as a prefix for any HTTP method call to return the
96+
the raw response object instead of the parsed content.
97+
98+
For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
99+
"""
83100
return AsyncBetaWithRawResponse(self)
84101

85102
@cached_property
86103
def with_streaming_response(self) -> AsyncBetaWithStreamingResponse:
104+
"""
105+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
106+
107+
For more information, see https://www.github.com/openai/openai-python#with_streaming_response
108+
"""
87109
return AsyncBetaWithStreamingResponse(self)
88110

89111

src/openai/resources/beta/threads/messages.py

+22
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,21 @@
3232
class Messages(SyncAPIResource):
3333
@cached_property
3434
def with_raw_response(self) -> MessagesWithRawResponse:
35+
"""
36+
This property can be used as a prefix for any HTTP method call to return the
37+
the raw response object instead of the parsed content.
38+
39+
For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
40+
"""
3541
return MessagesWithRawResponse(self)
3642

3743
@cached_property
3844
def with_streaming_response(self) -> MessagesWithStreamingResponse:
45+
"""
46+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
47+
48+
For more information, see https://www.github.com/openai/openai-python#with_streaming_response
49+
"""
3950
return MessagesWithStreamingResponse(self)
4051

4152
def create(
@@ -295,10 +306,21 @@ def delete(
295306
class AsyncMessages(AsyncAPIResource):
296307
@cached_property
297308
def with_raw_response(self) -> AsyncMessagesWithRawResponse:
309+
"""
310+
This property can be used as a prefix for any HTTP method call to return the
311+
the raw response object instead of the parsed content.
312+
313+
For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
314+
"""
298315
return AsyncMessagesWithRawResponse(self)
299316

300317
@cached_property
301318
def with_streaming_response(self) -> AsyncMessagesWithStreamingResponse:
319+
"""
320+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
321+
322+
For more information, see https://www.github.com/openai/openai-python#with_streaming_response
323+
"""
302324
return AsyncMessagesWithStreamingResponse(self)
303325

304326
async def create(

src/openai/resources/beta/threads/runs/runs.py

+22
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,21 @@ def steps(self) -> Steps:
6363

6464
@cached_property
6565
def with_raw_response(self) -> RunsWithRawResponse:
66+
"""
67+
This property can be used as a prefix for any HTTP method call to return the
68+
the raw response object instead of the parsed content.
69+
70+
For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
71+
"""
6672
return RunsWithRawResponse(self)
6773

6874
@cached_property
6975
def with_streaming_response(self) -> RunsWithStreamingResponse:
76+
"""
77+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
78+
79+
For more information, see https://www.github.com/openai/openai-python#with_streaming_response
80+
"""
7081
return RunsWithStreamingResponse(self)
7182

7283
@overload
@@ -1414,10 +1425,21 @@ def steps(self) -> AsyncSteps:
14141425

14151426
@cached_property
14161427
def with_raw_response(self) -> AsyncRunsWithRawResponse:
1428+
"""
1429+
This property can be used as a prefix for any HTTP method call to return the
1430+
the raw response object instead of the parsed content.
1431+
1432+
For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
1433+
"""
14171434
return AsyncRunsWithRawResponse(self)
14181435

14191436
@cached_property
14201437
def with_streaming_response(self) -> AsyncRunsWithStreamingResponse:
1438+
"""
1439+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
1440+
1441+
For more information, see https://www.github.com/openai/openai-python#with_streaming_response
1442+
"""
14211443
return AsyncRunsWithStreamingResponse(self)
14221444

14231445
@overload

0 commit comments

Comments
 (0)