类 DashScopeResponseParser
java.lang.Object
io.agentscope.core.formatter.dashscope.DashScopeResponseParser
Parses DashScope API responses to AgentScope ChatResponse.
-
字段概要
字段修饰符和类型字段说明protected static final StringPlaceholder name for tool call argument fragments in streaming responses. -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected voidaddToolCallsFromMessage(DashScopeMessage message, List<ContentBlock> blocks) Parse tool calls from DashScopeMessage and add to blocks.parseResponse(DashScopeResponse response, Instant startTime) Parse DashScopeResponse to AgentScope ChatResponse.
-
字段详细资料
-
FRAGMENT_PLACEHOLDER
Placeholder name for tool call argument fragments in streaming responses.- 另请参阅:
-
-
构造器详细资料
-
DashScopeResponseParser
public DashScopeResponseParser()
-
-
方法详细资料
-
parseResponse
Parse DashScopeResponse to AgentScope ChatResponse.- 参数:
response- DashScope response DTOstartTime- Request start time for calculating duration- 返回:
- AgentScope ChatResponse
-
addToolCallsFromMessage
Parse tool calls from DashScopeMessage and add to blocks.- 参数:
message- DashScopeMessageblocks- Content blocks to add tool use blocks to
-