Documentation
¶
Overview ¶
Package web defines readable web content, extraction and Agent adapters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateURL ¶
ValidateURL accepts absolute HTTP(S) URLs without embedded credentials.
Types ¶
type Document ¶
type Document struct {
URL string `json:"url"`
Title string `json:"title"`
Text string `json:"text"`
Markdown string `json:"markdown"`
Links []Link `json:"links,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
}
Document is untrusted source material, not application instructions.
type Extractor ¶
type Extractor interface {
Extract(ctx context.Context, url string, html []byte) (*Document, error)
}
Extractor extracts already-fetched UTF-8 HTML without fetching its links.
Click to show internal directories.
Click to hide internal directories.