Module spider::utils

source ·
Expand description

Application utils.

Modules§

Structs§

Enums§

Functions§

  • Clean the html removing css and js
  • Clean the html removing css and js default using the scraper crate.
  • Clean and remove all base64 images from the prompt.
  • Perform a network request to a resource extracting all content as text streaming.
  • Perform a network request to a resource extracting all content streaming.
  • Handle the OpenAI credits used. This does nothing without ‘openai’ feature flag.
  • Log to console if configuration verbose.
  • Perform a request to OpenAI Chat. This does nothing without the ‘openai’ flag enabled.
  • Store the page to cache to be re-used across HTTP request.