类的使用
io.agentscope.core.formatter.dashscope.dto.DashScopeMessage
使用DashScopeMessage的程序包
程序包
说明
-
io.agentscope.core.formatter.dashscope中DashScopeMessage的使用
修饰符和类型方法说明DashScopeMessageConverter.convertToMessage(Msg msg, boolean useMultimodalFormat) Convert single Msg to DashScopeMessage.DashScopeConversationMerger.mergeToMessage(List<Msg> msgs, Function<Msg, String> nameExtractor, Function<List<ContentBlock>, String> toolResultConverter, String historyPrompt) Merge conversation messages into a single DashScopeMessage (text-only mode).DashScopeConversationMerger.mergeToMultiModalMessage(List<Msg> msgs, Function<Msg, String> nameExtractor, Function<List<ContentBlock>, String> toolResultConverter, boolean isFirst) Merge conversation messages into a single DashScopeMessage (multimodal mode).返回变量类型为DashScopeMessage的类型的io.agentscope.core.formatter.dashscope中的方法修饰符和类型方法说明protected List<DashScopeMessage> protected List<DashScopeMessage> DashScopeChatFormatter.formatMultiModal(List<Msg> messages) Format AgentScope Msg objects to DashScope MultiModal message format.DashScopeMultiAgentFormatter.formatMultiModal(List<Msg> msgs) Format AgentScope Msg objects to DashScope MultiModal message format.修饰符和类型方法说明protected voidDashScopeResponseParser.addToolCallsFromMessage(DashScopeMessage message, List<ContentBlock> blocks) Parse tool calls from DashScopeMessage and add to blocks.类型变量类型为DashScopeMessage的io.agentscope.core.formatter.dashscope中的方法参数修饰符和类型方法说明voidDashScopeChatFormatter.applyCacheControl(List<DashScopeMessage> messages) Apply cache control to DashScope messages.voidDashScopeMultiAgentFormatter.applyCacheControl(List<DashScopeMessage> messages) Apply cache control to DashScope messages.DashScopeChatFormatter.buildRequest(String model, List<DashScopeMessage> messages, boolean stream) Build a complete DashScopeRequest for the API call.DashScopeChatFormatter.buildRequest(String model, List<DashScopeMessage> messages, boolean stream, GenerateOptions options, GenerateOptions defaultOptions, List<ToolSchema> tools, ToolChoice toolChoice) Build a complete DashScopeRequest with full configuration.DashScopeMultiAgentFormatter.buildRequest(String model, List<DashScopeMessage> messages, boolean stream) Build a complete DashScopeRequest for the API call. -
io.agentscope.core.formatter.dashscope.dto中DashScopeMessage的使用
返回变量类型为DashScopeMessage的类型的io.agentscope.core.formatter.dashscope.dto中的方法修饰符和类型方法说明DashScopeInput.Builder.messages(List<DashScopeMessage> messages) static DashScopeInputDashScopeInput.of(List<DashScopeMessage> messages) voidDashScopeInput.setMessages(List<DashScopeMessage> messages) 类型变量类型为DashScopeMessage的io.agentscope.core.formatter.dashscope.dto中的构造器参数 -
io.agentscope.core.model中DashScopeMessage的使用
类型变量类型为DashScopeMessage的io.agentscope.core.model中的方法参数修饰符和类型方法说明DashScopeChatModel.Builder.formatter(Formatter<DashScopeMessage, DashScopeResponse, DashScopeRequest> formatter) Sets the message formatter to use.类型变量类型为DashScopeMessage的io.agentscope.core.model中的构造器参数限定符构造器说明DashScopeChatModel(String apiKey, String modelName, boolean stream, Boolean enableThinking, Boolean enableSearch, EndpointType endpointType, GenerateOptions defaultOptions, String baseUrl, Formatter<DashScopeMessage, DashScopeResponse, DashScopeRequest> formatter, HttpTransport httpTransport, String publicKeyId, String publicKey) Creates a new DashScope chat model instance with explicit API type.DashScopeChatModel(String apiKey, String modelName, boolean stream, Boolean enableThinking, Boolean enableSearch, GenerateOptions defaultOptions, String baseUrl, Formatter<DashScopeMessage, DashScopeResponse, DashScopeRequest> formatter, HttpTransport httpTransport, String publicKeyId, String publicKey) Creates a new DashScope chat model instance with automatic API type detection.