Class ToolServiceResult
java.lang.Object
dev.langchain4j.service.tool.ToolServiceResult
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionToolServiceResult(ChatResponse chatResponse, List<ToolExecution> toolExecutions) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionstatic ToolServiceResult.Builderbuilder()Deprecated.Please useaggregateResponse()instead for claritybooleaninthashCode()booleanThe last request the tool loop sent to the model, whose response isfinalResponse(): its messages include the tool calls and tool results of all rounds.messages()The conversation the tool loop ended with (the messages sent, every tool round trip and the final response), when the AI Service has no chat memory.toString()
-
Constructor Details
-
ToolServiceResult
- Since:
- 1.2.0
-
ToolServiceResult
@Deprecated(since="1.2.0") public ToolServiceResult(ChatResponse chatResponse, List<ToolExecution> toolExecutions) Deprecated.Please useToolServiceResult(Builder)instead
-
-
Method Details
-
intermediateResponses
- Since:
- 1.2.0
-
finalResponse
- Since:
- 1.2.0
-
aggregateResponse
- Since:
- 1.2.0
-
chatResponse
Deprecated.Please useaggregateResponse()instead for clarity -
toolExecutions
-
aggregateTokenUsage
- Since:
- 1.2.0
-
immediateToolReturn
public boolean immediateToolReturn()- Since:
- 1.4.0
-
messages
The conversation the tool loop ended with (the messages sent, every tool round trip and the final response), when the AI Service has no chat memory. Empty when it has one: the chat memory holds the conversation then.- Since:
- 1.23.0
-
lastChatRequest
The last request the tool loop sent to the model, whose response isfinalResponse(): its messages include the tool calls and tool results of all rounds.nullwhen the loop sent no request, because the response of the call that started the loop had no tool calls.- Since:
- 1.23.0
-
equals
-
hashCode
-
toString
-
builder
-
ToolServiceResult(Builder)instead