This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Stage 2 — batched classification of DEFER units. | |
| Units are sent as contiguous numbered blocks so each unit doubles as context | |
| for its neighbours (no duplicated context tokens). The returned index set is | |
| validated against the sent index set; a mismatch triggers a batch split and | |
| retry rather than silently losing units. | |
| """ | |
| from __future__ import annotations | |
| import re |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| OPENAI_API_KEY="your openai api key" | |
| PINECONE_API_KEY="your pinecone api key" | |
| PINECONE_INDEX="name of your pinecone index" |