Class AnthropicResponseParser
java.lang.Object
io.agentscope.extensions.model.anthropic.formatter.AnthropicResponseParser
Parses Anthropic API responses (both streaming and non-streaming) into AgentScope ChatResponse
objects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic io.agentscope.core.model.ChatResponseparseMessage(com.anthropic.models.messages.Message message, Instant startTime) Parse non-streaming Anthropic Message to ChatResponse.static reactor.core.publisher.Flux<io.agentscope.core.model.ChatResponse>parseStreamEvents(reactor.core.publisher.Flux<com.anthropic.models.messages.RawMessageStreamEvent> eventFlux, Instant startTime) Parse streaming Anthropic events to ChatResponse Flux.
-
Constructor Details
-
AnthropicResponseParser
public AnthropicResponseParser()
-
-
Method Details
-
parseMessage
public static io.agentscope.core.model.ChatResponse parseMessage(com.anthropic.models.messages.Message message, Instant startTime) Parse non-streaming Anthropic Message to ChatResponse. -
parseStreamEvents
public static reactor.core.publisher.Flux<io.agentscope.core.model.ChatResponse> parseStreamEvents(reactor.core.publisher.Flux<com.anthropic.models.messages.RawMessageStreamEvent> eventFlux, Instant startTime) Parse streaming Anthropic events to ChatResponse Flux.
-