Class Message.MessageBuilder<C extends Message,B extends Message.MessageBuilder<C,B>>
java.lang.Object
com.alibaba.dashscope.legacy_2x.common.Message.MessageBuilder<C,B>
- Enclosing class:
- Message
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Cbuild()The conversation content.contents(List<MessageContentBase> contents) for multi modal message type: [text|image_url] image_url: url detailtool namepartial modereasoningContent(String reasoningContent) chain of thought contentThe role, can be `user` and `system` and `assistant` and 'tool'.protected abstract Bself()toolCallId(String toolCallId) For tool resulttoolCalls(List<ToolCallBase> toolCalls) For tool callstoString()
-
Constructor Details
-
MessageBuilder
public MessageBuilder()
-
-
Method Details
-
role
The role, can be `user` and `system` and `assistant` and 'tool'.- Returns:
this.
-
content
The conversation content.- Returns:
this.
-
toolCalls
For tool calls- Returns:
this.
-
toolCallId
For tool result- Returns:
this.
-
name
tool name- Returns:
this.
-
contents
for multi modal message type: [text|image_url] image_url: url detail- Returns:
this.
-
reasoningContent
chain of thought content- Returns:
this.
-
partial
partial mode- Returns:
this.
-
self
-
build
-
toString
-