Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client fetches web content over HTTP and screens it through an LLM-based pipeline (Markdown extraction + indirect-prompt-injection detection).
func NewClient ¶
func NewClient(cfg ClientConfig) *Client
NewClient builds a Client whose HTTP transport rejects connections to non-public IP ranges (SSRF guard) unless cfg.AllowPrivateIP is set.
type ClientConfig ¶
type ClientConfig struct {
// Timeout bounds the whole HTTP request (dial + TLS + headers + body).
Timeout time.Duration
// MaxBytes caps how much of the response body is read; the remainder is
// dropped and the result is marked truncated.
MaxBytes int64
// UserAgent is sent on every request.
UserAgent string
// LLM screens fetched bodies for indirect prompt injection and reformats
// them to Markdown. Required: New returns no tools when it is nil.
LLM gollem.LLMClient
// AllowPrivateIP disables the SSRF guard. It exists only as a test seam so
// the fetch path can be exercised against loopback httptest servers;
// production callers always leave it false.
AllowPrivateIP bool
}
ClientConfig carries every parameter needed to construct a Client. All values are supplied by the caller (CLI config) — the package embeds no defaults so timeout / size limits stay configurable from one place.
Click to show internal directories.
Click to hide internal directories.