File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
767767def 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.
You can’t perform that action at this time.
0 commit comments