Open
Description
Would you be interested in a PR that would modify the existing logProgress option on BaseEmbedding
to take a callback that gets called with the progress so far and the queue length.
This is useful for desktop apps where users might be shown a progress bar in the UI.
I see two ways to do it:
- new progressCallback arg, deprecate logProgress: maintain logProgress (for now) its functionality (since the
logProgress: true
option would be superseded byprogressCallback: (i, queue_length) => console.log(
getting embedding progress: ${i} / ${queue.length});
- change the type of logProgress to be a boolean or a function; if it's
true
, use the existing console.log.
I've used #1 (minus the deprecation of logProgress) here: https://github.com/jeremybmerrill/meaningfully/blob/feature/progress-bar/src/main/services/progressOpenAIEmbedding.ts
let me know if you want this, and I will send a PR (with tests).
Metadata
Metadata
Assignees
Labels
No labels