public class Message extends AbstractModel
header, skipSign| Constructor and Description | 
|---|
| Message() | 
| Message(Message source)NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
       and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy. | 
| Modifier and Type | Method and Description | 
|---|---|
| String | getContent()Get 具体文本内容 | 
| String | getRole()Get 角色,可选值包括 system、user、assistant、 tool。 | 
| String | getToolCallId()Get 当role为tool时传入,标识具体的函数调用 | 
| ToolCall[] | getToolCalls()Get 模型生成的工具调用 | 
| void | setContent(String Content)Set 具体文本内容 | 
| void | setRole(String Role)Set 角色,可选值包括 system、user、assistant、 tool。 | 
| void | setToolCallId(String ToolCallId)Set 当role为tool时传入,标识具体的函数调用 | 
| void | setToolCalls(ToolCall[] ToolCalls)Set 模型生成的工具调用 | 
| void | toMap(HashMap<String,String> map,
     String prefix)Internal implementation, normal users should not use it. | 
any, fromJsonString, getBinaryParams, GetHeader, getMultipartRequestParams, getSkipSign, isStream, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonStringpublic Message()
public Message(Message source)
public String getRole()
public void setRole(String Role)
Role - 角色,可选值包括 system、user、assistant、 tool。public String getContent()
public void setContent(String Content)
Content - 具体文本内容public String getToolCallId()
public void setToolCallId(String ToolCallId)
ToolCallId - 当role为tool时传入,标识具体的函数调用public ToolCall[] getToolCalls()
public void setToolCalls(ToolCall[] ToolCalls)
ToolCalls - 模型生成的工具调用Copyright © 2025. All rights reserved.