Skip to main content

Efficient context builder

Project description

contextF

Efficient context builder. Build relevant context from documents using configurable search patterns and token-aware windowing.

Installation

pip install contextF

For PDF parsing:

pip install contextF[pdf]

Parameters

Search Parameters

  • docs_path: Directory containing documents (default: "./docs")
  • file_patterns: File types to search (default: [".md", ".txt"])
  • max_patterns_per_query: Max search patterns to use (default: 3)
  • max_matches_per_file: Max matches per file (default: 3)
  • case_sensitive: Case sensitive search (default: false)

Token Parameters

  • max_context_tokens: Maximum total context tokens (default: 500000)
  • context_window_tokens: Context window size around matches (default: 10000)
  • max_file_tokens: Max tokens per file before windowing (default: 200000)
  • encoding: Tokenizer encoding (default: "cl100k_base")

LLM Parameters (Optional)

  • enabled: Enable LLM pattern generation (default: true)
  • model: OpenAI model (default: "gpt-4.1-mini")
  • temperature: LLM temperature (default: 0.3)

Documentation

For detailed documentation and code examples, please refer to the README.md file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

contextf-0.0.6.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

contextf-0.0.6-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file contextf-0.0.6.tar.gz.

File metadata

  • Download URL: contextf-0.0.6.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for contextf-0.0.6.tar.gz
Algorithm Hash digest
SHA256 8b9b2341573e25cf416e335d1c9f1cc371a2e47204ab16338abef43b413faeaf
MD5 06429b125f59d750a05e4cf38516d5ef
BLAKE2b-256 833764a56a96d2d8b678da1eadadad559cacf32a47804c84e4f0596cbd034f3d

See more details on using hashes here.

File details

Details for the file contextf-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: contextf-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 16.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for contextf-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 753ae917222e2ea3702dd09722d0eddd78f9002eeb705f1ff5d3ff1bbb13fe7d
MD5 bfa152f43f586a89e7bd6c5c4a671c1e
BLAKE2b-256 08e0d1c0cfd9b48082b1b95247716c8a52d1aced599d0e8d77eb5ad74072c320

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page