Skip to content

Commit e10ebe4

Browse files
chore(internal): revert recent options change (#197)
1 parent 0dd9a28 commit e10ebe4

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

src/finch/_base_client.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@ def _request(
863863
self._prepare_request(request)
864864

865865
try:
866-
response = self._client.send(request, auth=self.custom_auth, stream=stream or options.stream or False)
866+
response = self._client.send(request, auth=self.custom_auth, stream=stream)
867867
log.debug(
868868
'HTTP Request: %s %s "%i %s"', request.method, request.url, response.status_code, response.reason_phrase
869869
)
@@ -1304,7 +1304,7 @@ async def _request(
13041304
await self._prepare_request(request)
13051305

13061306
try:
1307-
response = await self._client.send(request, auth=self.custom_auth, stream=stream or options.stream or False)
1307+
response = await self._client.send(request, auth=self.custom_auth, stream=stream)
13081308
log.debug(
13091309
'HTTP Request: %s %s "%i %s"', request.method, request.url, response.status_code, response.reason_phrase
13101310
)
@@ -1541,7 +1541,6 @@ def make_request_options(
15411541
idempotency_key: str | None = None,
15421542
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
15431543
post_parser: PostParser | NotGiven = NOT_GIVEN,
1544-
stream: bool | None = None,
15451544
) -> RequestOptions:
15461545
"""Create a dict of type RequestOptions without keys of NotGiven values."""
15471546
options: RequestOptions = {}
@@ -1563,9 +1562,6 @@ def make_request_options(
15631562
if idempotency_key is not None:
15641563
options["idempotency_key"] = idempotency_key
15651564

1566-
if stream is not None:
1567-
options["stream"] = stream
1568-
15691565
if is_given(post_parser):
15701566
# internal
15711567
options["post_parser"] = post_parser # type: ignore

src/finch/_models.py

-2
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,6 @@ class FinalRequestOptionsInput(TypedDict, total=False):
403403
params: Query
404404
headers: Headers
405405
max_retries: int
406-
stream: bool | None
407406
timeout: float | Timeout | None
408407
files: HttpxRequestFiles | None
409408
idempotency_key: str
@@ -421,7 +420,6 @@ class FinalRequestOptions(pydantic.BaseModel):
421420
timeout: Union[float, Timeout, None, NotGiven] = NotGiven()
422421
files: Union[HttpxRequestFiles, None] = None
423422
idempotency_key: Union[str, None] = None
424-
stream: Union[bool, None] = None
425423
post_parser: Union[Callable[[Any], Any], NotGiven] = NotGiven()
426424

427425
# It should be noted that we cannot use `json` here as that would override

src/finch/_types.py

-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ async def aclose(self) -> None:
257257
class RequestOptions(TypedDict, total=False):
258258
headers: Headers
259259
max_retries: int
260-
stream: bool
261260
timeout: float | Timeout | None
262261
params: Query
263262
extra_json: AnyMapping

0 commit comments

Comments
 (0)