File size: 825 Bytes
33340fe
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Core: `InputHandler`

**Code**: `adsp/core/input_handler/__init__.py`

## Purpose

`InputHandler` normalizes user inputs before retrieval and prompt building.

## Responsibilities

- Normalize text input (current)
- (Planned) route and preprocess multimodal inputs:
  - PDF text extraction + page selection
  - Image preprocessing and OCR / captioning

## Public API

### `normalize(text: str) -> str`

**Input**
- raw text string

**Output**
- stripped text string (`text.strip()`)

## Key dependencies / technologies

- Python `dataclasses`

## Notes / production hardening

To meet `docs/md/design.md` multimodal requirements, expand this component with:
- PDF extraction via `pymupdf` (`fitz`) or `pdf2image` + OCR
- Attachment routing into the pipeline used in `adsp/data_pipeline/persona_data_pipeline/extract_raw/`