public static class McpSchema.CreateMessageResult extends java.lang.Object implements McpSchema.Result
| 限定符和类型 | 类和说明 |
|---|---|
static class |
McpSchema.CreateMessageResult.Builder |
static class |
McpSchema.CreateMessageResult.StopReason |
| 构造器和说明 |
|---|
CreateMessageResult(McpSchema.Role role,
McpSchema.Content content,
java.lang.String model,
McpSchema.CreateMessageResult.StopReason stopReason) |
CreateMessageResult(McpSchema.Role role,
McpSchema.Content content,
java.lang.String model,
McpSchema.CreateMessageResult.StopReason stopReason,
java.util.Map<java.lang.String,java.lang.Object> meta) |
| 限定符和类型 | 方法和说明 |
|---|---|
static McpSchema.CreateMessageResult.Builder |
builder() |
McpSchema.Content |
content() |
java.util.Map<java.lang.String,java.lang.Object> |
meta() |
java.lang.String |
model() |
McpSchema.Role |
role() |
McpSchema.CreateMessageResult.StopReason |
stopReason() |
public CreateMessageResult(McpSchema.Role role, McpSchema.Content content, java.lang.String model, McpSchema.CreateMessageResult.StopReason stopReason, java.util.Map<java.lang.String,java.lang.Object> meta)
role - The role of the message sender (typically assistant)content - The content of the sampled messagemodel - The name of the model that generated the messagestopReason - The reason why sampling stopped, if knownmeta - See specification for notes on _meta usagepublic CreateMessageResult(McpSchema.Role role, McpSchema.Content content, java.lang.String model, McpSchema.CreateMessageResult.StopReason stopReason)
public McpSchema.Role role()
public McpSchema.Content content()
public java.lang.String model()
public McpSchema.CreateMessageResult.StopReason stopReason()
public java.util.Map<java.lang.String,java.lang.Object> meta()
meta 在接口中 McpSchema.Metapublic static McpSchema.CreateMessageResult.Builder builder()