Files
DeepTutor/deeptutor/services/embedding
Bingxi Zhao (Frank) 0950c98e18 fix: merge PR #268 (embedding progress + 429 retry) with review fixes
Merge oxkage's embedding progress tracking and HTTP 429 rate limit
retry (PR #268), with the following review-driven improvements:

- Restore default batch_size=10 and request_timeout=60 to avoid
  performance regression for non-free-tier users
- Promote batch_delay to EmbeddingConfig (was private adapter attr)
  so all adapters respect user configuration instead of hardcoded 0.5s
- Use set_progress_callback() on existing embed model instead of
  creating a new CustomEmbedding instance (avoids global state mutation)
- Clean up progress callback in finally blocks to prevent leaking
  into subsequent search/query calls
- Wire progress_callback through add_documents (not just initialize)
- Remove dead HTTPStatusError 429 branch (already handled before
  raise_for_status)
- Remove unused total_docs variable in initializer

Made-with: Cursor
2026-04-10 00:33:57 +08:00
..