Build an OpenAI-compatible function-calling tool definition for
hf_chat(). The parameters argument can be a lightweight named
character vector, for example c(city = "string"), or a full JSON Schema
object.
Value
A list suitable for the tools argument of hf_chat().
Examples
weather_tool <- hf_tool(
"get_weather",
"Get current weather for a city.",
c(city = "string")
)