Package dev.langchain4j.internal
Class ToolCallBuilder
java.lang.Object
dev.langchain4j.internal.ToolCallBuilder
Internal helper that helps to build partial and complete tool calls during streaming.
Volatile fields, StringBuffer, and ConcurrentLinkedQueue are used to ensure safe access, as incoming SSE events may be processed by different threads depending on the underlying HTTP client implementation.
- Since:
- 1.2.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendArguments
(String partialArguments) boolean
id()
int
index()
name()
void
updateIndex
(Integer index) updateName
(String name)
-
Constructor Details
-
ToolCallBuilder
public ToolCallBuilder() -
ToolCallBuilder
public ToolCallBuilder(int index)
-
-
Method Details
-
index
public int index() -
updateIndex
-
id
-
updateId
-
name
-
updateName
-
appendArguments
-
buildAndReset
-
hasRequests
public boolean hasRequests() -
allRequests
-