public class ToolExecutionResultMessage extends Object implements ChatMessage
ToolExecutionRequest
.
ToolExecutionRequest
s come from a previous AiMessage.toolExecutionRequests()
.Constructor and Description |
---|
ToolExecutionResultMessage(String id,
String toolName,
String text)
Creates a
ToolExecutionResultMessage . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static ToolExecutionResultMessage |
from(String id,
String toolName,
String toolExecutionResult)
Creates a
ToolExecutionResultMessage from a ToolExecutionRequest and the result of the tool execution. |
static ToolExecutionResultMessage |
from(ToolExecutionRequest request,
String toolExecutionResult)
Creates a
ToolExecutionResultMessage from a ToolExecutionRequest and the result of the tool execution. |
int |
hashCode() |
String |
id()
Returns the id of the tool.
|
String |
text()
Returns the result of the tool execution.
|
static ToolExecutionResultMessage |
toolExecutionResultMessage(String id,
String toolName,
String toolExecutionResult)
Creates a
ToolExecutionResultMessage from a ToolExecutionRequest and the result of the tool execution. |
static ToolExecutionResultMessage |
toolExecutionResultMessage(ToolExecutionRequest request,
String toolExecutionResult)
Creates a
ToolExecutionResultMessage from a ToolExecutionRequest and the result of the tool execution. |
String |
toolName()
Returns the name of the tool.
|
String |
toString() |
ChatMessageType |
type()
The type of the message.
|
public ToolExecutionResultMessage(String id, String toolName, String text)
ToolExecutionResultMessage
.id
- the id of the tool.toolName
- the name of the tool.text
- the result of the tool execution.public String id()
public String toolName()
public String text()
text
in interface ChatMessage
public ChatMessageType type()
ChatMessage
type
in interface ChatMessage
public static ToolExecutionResultMessage from(ToolExecutionRequest request, String toolExecutionResult)
ToolExecutionResultMessage
from a ToolExecutionRequest
and the result of the tool execution.request
- the request.toolExecutionResult
- the result of the tool execution.ToolExecutionResultMessage
.public static ToolExecutionResultMessage from(String id, String toolName, String toolExecutionResult)
ToolExecutionResultMessage
from a ToolExecutionRequest
and the result of the tool execution.id
- the id of the tool.toolName
- the name of the tool.toolExecutionResult
- the result of the tool execution.ToolExecutionResultMessage
.public static ToolExecutionResultMessage toolExecutionResultMessage(ToolExecutionRequest request, String toolExecutionResult)
ToolExecutionResultMessage
from a ToolExecutionRequest
and the result of the tool execution.request
- the request.toolExecutionResult
- the result of the tool execution.ToolExecutionResultMessage
.public static ToolExecutionResultMessage toolExecutionResultMessage(String id, String toolName, String toolExecutionResult)
ToolExecutionResultMessage
from a ToolExecutionRequest
and the result of the tool execution.id
- the id of the tool.toolName
- the name of the tool.toolExecutionResult
- the result of the tool execution.ToolExecutionResultMessage
.Copyright © 2024. All rights reserved.