CrawlerConfig

org.llm4s.rag.loader.CrawlerConfig
See theCrawlerConfig companion object
final case class CrawlerConfig(maxDepth: Int, maxPages: Int, followPatterns: Seq[String], excludePatterns: Seq[String], respectRobotsTxt: Boolean, delay: FiniteDuration, timeout: FiniteDuration, userAgent: String, maxQueueSize: Int, includeQueryParams: Boolean, sameDomainOnly: Boolean, acceptContentTypes: Set[String], urlPolicy: UrlPolicy)

Configuration for web crawling.

Controls how the WebCrawlerLoader discovers and fetches web pages.

Value parameters

acceptContentTypes

Content types to process (others are skipped)

delay

Delay between requests (rate limiting); a robots.txt Crawl-delay that is longer wins

excludePatterns

URL patterns to exclude (glob syntax)

followPatterns

URL patterns to follow (glob syntax with asterisk wildcards)

includeQueryParams

Whether to treat URLs with different query params as distinct pages

maxDepth

Maximum link depth to follow from seed URLs (0 = seed URLs only)

maxPages

Maximum total pages to crawl

maxQueueSize

Maximum number of URLs to queue (prevents unbounded memory usage)

respectRobotsTxt

Whether to respect robots.txt directives

sameDomainOnly

Whether to restrict crawling to the same domain as seed URLs

timeout

HTTP connect and read timeout

urlPolicy

Which URLs may be requested - each seed, crawled link, redirect hop and robots.txt - and the addresses the crawler connects to (default: UrlPolicy.default, public addresses only)

userAgent

User agent string for HTTP requests

Attributes

Companion
object
Source
CrawlerConfig.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

Set acceptable content types

Set acceptable content types

Attributes

Source
CrawlerConfig.scala

Set rate limit delay

Set rate limit delay

Attributes

Source
CrawlerConfig.scala

Set URL patterns to exclude

Set URL patterns to exclude

Attributes

Source
CrawlerConfig.scala

Set URL patterns to follow

Set URL patterns to follow

Attributes

Source
CrawlerConfig.scala

Set max crawl depth

Set max crawl depth

Attributes

Source
CrawlerConfig.scala

Set max pages to crawl

Set max pages to crawl

Attributes

Source
CrawlerConfig.scala

Set max queue size

Set max queue size

Attributes

Source
CrawlerConfig.scala

Set whether to include query parameters in URL comparison

Set whether to include query parameters in URL comparison

Attributes

Source
CrawlerConfig.scala

Set whether to respect robots.txt

Set whether to respect robots.txt

Attributes

Source
CrawlerConfig.scala

Set whether to restrict to same domain

Set whether to restrict to same domain

Attributes

Source
CrawlerConfig.scala

Set request timeout

Set request timeout

Attributes

Source
CrawlerConfig.scala

Set the policy every request is checked against

Set the policy every request is checked against

Attributes

Source
CrawlerConfig.scala

Set user agent

Set user agent

Attributes

Source
CrawlerConfig.scala

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product