Spaces:
Running
Running
Download client/modules/pageExcerptWorkerProtocol.ts from Felladrin/MiniSearch: direct link, hf CLI and curl.
- Browser
- Download file 678 Bytes
-
https://huggingface.co/spaces/Felladrin/MiniSearch/resolve/main/client/modules/pageExcerptWorkerProtocol.ts
- Command line
-
hf download hf://spaces/Felladrin/MiniSearch/client/modules/pageExcerptWorkerProtocol.ts
-
curl -L -o pageExcerptWorkerProtocol.ts https://huggingface.co/spaces/Felladrin/MiniSearch/resolve/main/client/modules/pageExcerptWorkerProtocol.ts
678 Bytes
| /** | |
| * Messages exchanged with `pageExcerptWorker`, shared by both sides. | |
| * | |
| * Each allocation gets its own worker, terminated as soon as the excerpts | |
| * come back, so there is no cancel message and no need for the worker to | |
| * tell requests apart. | |
| */ | |
| export interface WorkerRequest { | |
| /** Full body of every page read by `/page-content`, in result order. */ | |
| contents: string[]; | |
| /** Tokens the excerpts may occupy together. */ | |
| tokenBudget: number; | |
| } | |
| export type WorkerResponse = | |
| | { | |
| type: "excerpts"; | |
| /** One entry per request entry, same order; empty when a page got no share. */ | |
| excerpts: string[]; | |
| } | |
| | { type: "error"; message: string }; | |