Skip to content

Commit 488f5d1

Browse files
committed
fixes
1 parent 7fa464f commit 488f5d1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/cohere/oci_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ def _hook(response: httpx.Response) -> None:
392392
# For streaming responses, wrap the stream with a transformer
393393
if is_stream:
394394
original_stream = response.stream
395-
transformed_stream = transform_oci_stream_wrapper(original_stream, endpoint)
395+
transformed_stream = transform_oci_stream_wrapper(typing.cast(SyncByteStream, original_stream), endpoint)
396396
response.stream = Streamer(transformed_stream)
397397
# Reset consumption flags
398398
if hasattr(response, "_content"):
@@ -765,7 +765,7 @@ def transform_oci_response_to_cohere(
765765

766766

767767
def transform_oci_stream_wrapper(
768-
stream: typing.Iterator[bytes], endpoint: str
768+
stream: SyncByteStream, endpoint: str
769769
) -> typing.Iterator[bytes]:
770770
"""
771771
Wrap OCI stream and transform events to Cohere V2 format.

0 commit comments

Comments
 (0)