类 AnthropicResponseParser

java.lang.Object
io.agentscope.core.formatter.anthropic.AnthropicResponseParser

public class AnthropicResponseParser extends Object
Parses Anthropic API responses (both streaming and non-streaming) into AgentScope ChatResponse objects.
  • 构造器详细资料

    • 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.