e161142ea5
Sonnet 4 and model aliasing * Add EXHIBIT_HEADER_MARKERS for improved document header recognition in table handling * Refactor EXHIBIT_HEADER_MARKERS definition for improved clarity and organization * remove unused page span tracking code; add unit tests for new functionality * remove debugging logs from combine_continuous_tables function * Refactor logging setup and update test file configuration in investment field testing notebook * Merge remote-tracking branch 'origin/main' into feature/further-phase-1-and-2-fixes * Merge remote-tracking branch 'origin/main' into feature/further-phase-1-and-2-fixes * Refactor model ID handling and add support for model aliases in llm_utils * Update model IDs to use alias in LLM invocation functions in one_to_n_funcs * change pre-and-post-processing to new model alias method * Update model ID references to use 'sonnet_latest' in LLM invocation functions * Update LLM invocation functions to use 'sonnet_latest' model ID * Update LLM invocation functions to use 'sonnet_latest' and 'haiku_latest' model IDs * update invoke_claude function docstring * Fix caller frame to address mypy error Approved-by: Katon Minhas
Field Extraction
Running the Code
This project uses Python's module system for imports. To run the code properly:
-
DO NOT run files directly like this:
python src/client/main.py # ❌ This won't work -
INSTEAD, use Python's module flag (
-m) from the project root:python -m src.client.main # ✅ This is correct
Why?
The code uses absolute imports (e.g., from src.utils import llm_utils) to maintain a clear and consistent package structure. Running with python -m ensures Python can properly resolve these imports.
Development
- All imports should use the
src.prefix (e.g.,from src.utils import llm_utils) - Always run code from the project root directory using the
-mflag - Tests are configured to handle these imports automatically via pytest settings in pyproject.toml
Configuration
The project uses poetry for dependency management and pytest for testing. Key configurations in pyproject.toml:
[tool.pytest.ini_options]
pythonpath=["."]
testpaths = [
"tests"
]
Dependencies
To install dependencies:
poetry install
To run tests:
poetry run pytest
To run type checking:
poetry run mypy .