Class PartialToolCall

java.lang.Object
dev.langchain4j.model.chat.response.PartialToolCall

@Experimental public class PartialToolCall extends Object
Represents a partial tool call. Includes the index, ID, name, and a portion of the arguments.
Since:
1.2.0
See Also:
  • Constructor Details

  • Method Details

    • index

      public int index()
      The index of the tool call, starting from 0 and increasing by 1. When the LLM initiates multiple tool calls, this index helps correlate the different PartialToolCalls with each other and with the final CompleteToolCall.
    • id

      public String id()
      The unique identifier for the tool call, generated by the LLM provider. Please note that some LLM providers (e.g., Google, Ollama) may omit this ID.
    • name

      public String name()
      The name of the tool being invoked.
    • partialArguments

      public String partialArguments()
      A portion of the arguments for the tool. When combined, the arguments from all PartialToolCalls should form a complete and valid JSON string.
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • builder

      public static PartialToolCall.Builder builder()