Skip to content

WebConfig

Category: Web

Source: web_config.dart

Enums

WebSearchProviderType

ValueDescription
brave
tavily
firecrawl
duckduckgo

OcrProviderType

ValueDescription
mistral
openai

Classes

WebFetchConfig

Constructor

dart
const WebFetchConfig({
    this.timeoutSeconds = AppConstants.webFetchTimeoutSeconds,
    this.maxBytes = AppConstants.webFetchMaxBytes,
    this.defaultMaxTokens = AppConstants.webFetchDefaultMaxTokens,
    this.jinaApiKey,
    this.jinaBaseUrl = 'https://r.jina.ai',
    this.allowJinaFallback = true,
  })

Properties

PropertyTypeDescription
timeoutSecondsint
maxBytesint
defaultMaxTokensint
jinaApiKeyString?
jinaBaseUrlString
allowJinaFallbackbool

WebSearchConfig

Constructor

dart
const WebSearchConfig({
    this.provider,
    this.timeoutSeconds = AppConstants.webSearchTimeoutSeconds,
    this.defaultMaxResults = AppConstants.webSearchDefaultMaxResults,
    this.braveApiKey,
    this.tavilyApiKey,
    this.firecrawlApiKey,
    this.firecrawlBaseUrl,
  })

Properties

PropertyTypeDescription
providerWebSearchProviderType?
timeoutSecondsint
defaultMaxResultsint
braveApiKeyString?
tavilyApiKeyString?
firecrawlApiKeyString?
firecrawlBaseUrlString?
resolvedProviderWebSearchProviderType? getAuto-detect provider from available API keys. Priority: brave → tavily → firecrawl.

PdfConfig

Constructor

dart
const PdfConfig({
    this.maxBytes = AppConstants.pdfMaxBytes,
    this.timeoutSeconds = AppConstants.pdfTimeoutSeconds,
    this.enableOcrFallback = true,
    this.ocrProvider = OcrProviderType.mistral,
    this.mistralApiKey,
    this.mistralModel = 'mistral-ocr-small',
    this.openaiApiKey,
    this.openaiModel = 'gpt-4.1-mini',
  })

Properties

PropertyTypeDescription
maxBytesint
timeoutSecondsint
enableOcrFallbackbool
ocrProviderOcrProviderType
mistralApiKeyString?
mistralModelString
openaiApiKeyString?
openaiModelString
hasOcrCredentialsbool getWhether OCR is available (has at least one API key configured).

WebConfig

Constructor

dart
const WebConfig({
    this.fetch = const WebFetchConfig(),
    this.search = const WebSearchConfig(),
    this.pdf = const PdfConfig(),
    this.browser = const BrowserConfig(),
  })

Properties

PropertyTypeDescription
fetchWebFetchConfig
searchWebSearchConfig
pdfPdfConfig
browserBrowserConfig

Released under the MIT License.