HTTPTool
org.llm4s.toolapi.builtin.http.HTTPTool
object HTTPTool
Tool for making HTTP requests.
Features:
- Support for GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS
- Request headers and body
- Domain allowlist/blocklist for security
- Response size limits
- Configurable timeout
Attributes
- Example
-
{ import org.llm4s.toolapi.builtin.http._ val httpTool = HTTPTool.create(HttpConfig( allowedDomains = Some(Seq("api.example.com")), allowedMethods = Seq("GET", "POST") )) val tools = new ToolRegistry(Seq(httpTool)) agent.run("Fetch data from https://api.example.com/data", tools)}
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
HTTPTool.type
Members list
In this article