@@ -21,7 +21,6 @@ use serde::Deserialize;
2121use stream:: { AnthropicToOpenAIStream , AnthropicToResponsesStream } ;
2222use types:: { AnthropicMetadata , AnthropicRequest , AnthropicResponse } ;
2323
24- use crate :: providers:: response:: streaming_response;
2524use crate :: {
2625 api_types:: {
2726 CreateChatCompletionPayload , CreateCompletionPayload , CreateEmbeddingPayload ,
@@ -33,7 +32,7 @@ use crate::{
3332 circuit_breaker:: CircuitBreaker ,
3433 error:: AnthropicErrorParser ,
3534 image:: { ImageFetchConfig , preprocess_messages_for_images} ,
36- response:: { error_response, json_response} ,
35+ response:: { error_response, json_response, streaming_response } ,
3736 retry:: with_circuit_breaker_and_retry,
3837 } ,
3938} ;
@@ -257,10 +256,7 @@ impl Provider for AnthropicProvider {
257256 }
258257 #[ cfg( target_arch = "wasm32" ) ]
259258 {
260- streaming_response (
261- status,
262- crate :: compat:: AssertSendStream ( transformed_stream) ,
263- )
259+ streaming_response ( status, crate :: compat:: AssertSendStream ( transformed_stream) )
264260 }
265261 } else {
266262 let anthropic_response: AnthropicResponse = response. json ( ) . await ?;
@@ -396,10 +392,7 @@ impl Provider for AnthropicProvider {
396392 }
397393 #[ cfg( target_arch = "wasm32" ) ]
398394 {
399- streaming_response (
400- status,
401- crate :: compat:: AssertSendStream ( transformed_stream) ,
402- )
395+ streaming_response ( status, crate :: compat:: AssertSendStream ( transformed_stream) )
403396 }
404397 } else {
405398 let anthropic_response: AnthropicResponse = response. json ( ) . await ?;
0 commit comments