类的使用
io.agentscope.core.message.ContentBlock
使用ContentBlock的程序包
程序包
说明
-
io.agentscope.core.agent.accumulator中ContentBlock的使用
修饰符和类型接口说明interfaceio.agentscope.core.agent.accumulator.ContentAccumulator<T extends ContentBlock>Content accumulator interface for accumulating streaming content blocks. -
io.agentscope.core.agent.user中ContentBlock的使用
返回变量类型为ContentBlock的类型的io.agentscope.core.agent.user中的方法类型变量类型为ContentBlock的io.agentscope.core.agent.user中的构造器参数限定符构造器说明UserInputData(List<ContentBlock> blocksInput, Map<String, Object> structuredInput) Creates a new UserInputData instance. -
io.agentscope.core.formatter中ContentBlock的使用
参数类型为ContentBlock的io.agentscope.core.formatter中的方法修饰符和类型方法说明protected StringAbstractBaseFormatter.extractTextContent(ContentBlock block) Extract text content from a single ContentBlock.类型变量类型为ContentBlock的io.agentscope.core.formatter中的方法参数修饰符和类型方法说明protected StringAbstractBaseFormatter.convertToolResultToString(List<ContentBlock> output) Convert tool result output to string representation. -
io.agentscope.core.formatter.anthropic中ContentBlock的使用
类型变量类型为ContentBlock的io.agentscope.core.formatter.anthropic中的构造器参数限定符构造器说明AnthropicMessageConverter(Function<List<ContentBlock>, String> toolResultConverter) Create an AnthropicMessageConverter with required dependency functions. -
io.agentscope.core.formatter.dashscope中ContentBlock的使用
类型变量类型为ContentBlock的io.agentscope.core.formatter.dashscope中的方法参数修饰符和类型方法说明protected voidDashScopeResponseParser.addToolCallsFromMessage(DashScopeMessage message, List<ContentBlock> blocks) Parse tool calls from DashScopeMessage and add to blocks.类型变量类型为ContentBlock的io.agentscope.core.formatter.dashscope中的构造器参数 -
io.agentscope.core.formatter.gemini中ContentBlock的使用
类型变量类型为ContentBlock的io.agentscope.core.formatter.gemini中的方法参数修饰符和类型方法说明protected voidGeminiResponseParser.parseToolCall(com.google.genai.types.FunctionCall functionCall, byte[] thoughtSignature, List<ContentBlock> blocks) Parse Gemini FunctionCall to ToolUseBlock. -
io.agentscope.core.formatter.ollama中ContentBlock的使用
类型变量类型为ContentBlock的io.agentscope.core.formatter.ollama中的方法参数修饰符和类型方法说明OllamaMultiAgentFormatter.convertToolResultToString(List<ContentBlock> blocks) Convert list of content blocks (usually from tool result) to string. -
io.agentscope.core.message中ContentBlock的使用
修饰符和类型类说明final classRepresents audio content in a message.final classRepresents image content in a message with URL or Base64 source.final classRepresents plain text content in a message.final classRepresents reasoning or thinking content in a message.final classRepresents the result of a tool execution.final classRepresents a tool use request within a message.final classRepresents video content in a message.类型参数类型为ContentBlock的io.agentscope.core.message中的方法修饰符和类型方法说明<T extends ContentBlock>
List<T> Msg.getContentBlocks(Class<T> blockClass) Get all content blocks of the specified type (type-safe).<T extends ContentBlock>
TMsg.getFirstContentBlock(Class<T> blockClass) Get the first content block of the specified type (type-safe).<T extends ContentBlock>
booleanMsg.hasContentBlocks(Class<T> blockClass) Check if this message has content blocks of the specified type (type-safe).返回变量类型为ContentBlock的类型的io.agentscope.core.message中的方法修饰符和类型方法说明Msg.getContent()Gets the immutable list of content blocks in this message.ToolResultBlock.getOutput()Gets the output content blocks.参数类型为ContentBlock的io.agentscope.core.message中的方法修饰符和类型方法说明Msg.Builder.content(ContentBlock block) Set content from a single content block (convenience method).Msg.Builder.content(ContentBlock... blocks) Set content from varargs content blocks (convenience method).static ToolResultBlockToolResultBlock.of(ContentBlock output) Create a result with output only (for tool method return values).static ToolResultBlockToolResultBlock.of(ContentBlock output, Map<String, Object> metadata) Create a result with output and metadata (for tool method return values).static ToolResultBlockToolResultBlock.of(String id, String name, ContentBlock output) Create a result with id, name, and output (for message ContentBlock).static ToolResultBlockCreate a result with all fields (for message ContentBlock with metadata).ToolResultBlock.Builder.output(ContentBlock output) Sets a single content block as output.类型变量类型为ContentBlock的io.agentscope.core.message中的方法参数修饰符和类型方法说明Msg.Builder.content(List<ContentBlock> content) Set content from a list of content blocks.static ToolResultBlockToolResultBlock.of(String id, String name, List<ContentBlock> output) Create a result with id, name, and output list (for message ContentBlock).static ToolResultBlockCreate a result with all fields including output list (for message ContentBlock with metadata).static ToolResultBlockToolResultBlock.of(List<ContentBlock> output) Create a result with output list only (for tool method return values).static ToolResultBlockCreate a result with output list and metadata (for tool method return values).ToolResultBlock.Builder.output(List<ContentBlock> output) Sets a list of content blocks as output.参数类型为ContentBlock的io.agentscope.core.message中的构造器限定符构造器说明ToolResultBlock(String id, String name, ContentBlock output) Creates a tool result block with a single content block output.类型变量类型为ContentBlock的io.agentscope.core.message中的构造器参数限定符构造器说明ToolResultBlock(String id, String name, List<ContentBlock> output) Creates a tool result block with a list of content blocks as output.ToolResultBlock(String id, String name, List<ContentBlock> output, Map<String, Object> metadata) -
io.agentscope.core.model中ContentBlock的使用
返回变量类型为ContentBlock的类型的io.agentscope.core.model中的方法类型变量类型为ContentBlock的io.agentscope.core.model中的方法参数修饰符和类型方法说明ChatResponse.Builder.content(List<ContentBlock> content) Sets the content blocks for the response.类型变量类型为ContentBlock的io.agentscope.core.model中的构造器参数限定符构造器说明ChatResponse(String id, List<ContentBlock> content, ChatUsage usage, Map<String, Object> metadata, String finishReason) Creates a new ChatResponse instance. -
io.agentscope.core.rag.model中ContentBlock的使用
参数类型为ContentBlock的io.agentscope.core.rag.model中的方法参数类型为ContentBlock的io.agentscope.core.rag.model中的构造器限定符构造器说明DocumentMetadata(ContentBlock content, String docId, String chunkId) Creates a new DocumentMetadata instance without custom payload.DocumentMetadata(ContentBlock content, String docId, String chunkId, Map<String, Object> payload) Creates a new DocumentMetadata instance with custom payload. -
io.agentscope.core.tool.mcp中ContentBlock的使用
修饰符和类型方法说明static ContentBlockMcpContentConverter.convertContent(io.modelcontextprotocol.spec.McpSchema.Content content) Converts a single MCP Content to an AgentScope ContentBlock.返回变量类型为ContentBlock的类型的io.agentscope.core.tool.mcp中的方法修饰符和类型方法说明static List<ContentBlock> McpContentConverter.convertContentList(List<io.modelcontextprotocol.spec.McpSchema.Content> mcpContents) Converts a list of MCP Content to AgentScope ContentBlocks.