类 AnthropicResponseParser
java.lang.Object
io.agentscope.core.formatter.anthropic.AnthropicResponseParser
Parses Anthropic API responses (both streaming and non-streaming) into AgentScope ChatResponse
objects.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static ChatResponseparseMessage(com.anthropic.models.messages.Message message, Instant startTime) Parse non-streaming Anthropic Message to ChatResponse.static reactor.core.publisher.Flux<ChatResponse> parseStreamEvents(reactor.core.publisher.Flux<com.anthropic.models.messages.RawMessageStreamEvent> eventFlux, Instant startTime) Parse streaming Anthropic events to ChatResponse Flux.
-
构造器详细资料
-
AnthropicResponseParser
public AnthropicResponseParser()
-
-
方法详细资料
-
parseMessage
public static ChatResponse parseMessage(com.anthropic.models.messages.Message message, Instant startTime) Parse non-streaming Anthropic Message to ChatResponse. -
parseStreamEvents
public static reactor.core.publisher.Flux<ChatResponse> parseStreamEvents(reactor.core.publisher.Flux<com.anthropic.models.messages.RawMessageStreamEvent> eventFlux, Instant startTime) Parse streaming Anthropic events to ChatResponse Flux.
-