You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
on call of AnthropicChatModel.stream (method signature: org.springframework.ai.anthropic.AnthropicChatModel#stream(Lorg/springframework/ai/chat/prompt/Prompt;)Lreactor/core/publisher/Flux;), thrown exception's response body is not displaying correctly.
At the AnthropicApi#110, ClientResponse#bodyToMono is never used as Publisher. I don't think it's intentional. It should display the body of error request, instead of Mono<T>#toString().
Environment
Amazon Corretto 17 (OpenJDK 17)
Spring Boot - 3.3.0
Spring AI - 1.0.0-M3
It can be displayed by passing WebClient builder in constructor of AnthropicApi, but it should display at default.
Await the mono variable. we can get body as String properly.
Bug description
on call of
AnthropicChatModel.stream
(method signature:org.springframework.ai.anthropic.AnthropicChatModel#stream(Lorg/springframework/ai/chat/prompt/Prompt;)Lreactor/core/publisher/Flux;
), thrown exception's response body is not displaying correctly.At the AnthropicApi#110,
ClientResponse#bodyToMono
is never used as Publisher. I don't think it's intentional. It should display the body of error request, instead ofMono<T>#toString()
.Environment
Amazon Corretto 17 (OpenJDK 17)
Spring Boot - 3.3.0
Spring AI - 1.0.0-M3
Minimal Complete Reproducible example
Here is simple java code to reproduce:
Expected behavior
It can be displayed by passing WebClient builder in constructor of
AnthropicApi
, but it should display at default.Await the mono variable. we can get body as String properly.
changing
Mono.just~~
to below code:Will work as expected.
The text was updated successfully, but these errors were encountered: