Class LLMToolCall

java.lang.Object
org.openhab.core.voice.text.interpreter.llm.LLMToolCall

@NonNullByDefault public class LLMToolCall extends Object
A DTO to store information about a tool call.
Author:
Florian Hotze - Initial contribution
  • Field Details

    • GSON

      protected static final com.google.gson.Gson GSON
    • tool

      public final String tool
      the UID of the LLMTool
    • params

      public final Map<String,Object> params
      the params of the tool call
  • Constructor Details

  • Method Details

    • map

      public static LLMToolCall map(LLMTool tool, Map<String,Object> params)
    • toJson

      public String toJson()
      Serializes this instance to JSON.
      Returns:
      the JSON
    • fromJson

      public static LLMToolCall fromJson(String json) throws com.google.gson.JsonSyntaxException
      Deserializes a tool call from JSON.
      Parameters:
      json - the JSON to deserialize
      Returns:
      the deserialized tool call
      Throws:
      com.google.gson.JsonSyntaxException - if json is not a valid representation of LLMToolCall
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object