mirror of
https://github.com/lfnovo/open-notebook.git
synced 2026-04-30 04:20:02 +00:00
fix: embedding batch sizing and 413 error classification (1.7.4)
- Add batching to generate_embeddings() (50 texts per batch with per-batch retry) to prevent 413 Payload Too Large errors on large documents - Add 413 error classification rule for user-friendly error messages - Fix misleading "Created 0 embedded chunks" log in process_source_command by removing premature get_embedded_chunks() call (embedding is fire-and-forget) Closes #594
This commit is contained in:
parent
924cd88494
commit
5d84ab0768
12 changed files with 190 additions and 37 deletions
|
|
@ -78,7 +78,7 @@ Note: Changes require restart of the application.
|
|||
|
||||
### embedding.py
|
||||
- **mean_pool_embeddings(embeddings)**: Combine multiple embeddings via normalized mean pooling
|
||||
- **generate_embeddings(texts)**: Batch embedding via single Esperanto API call
|
||||
- **generate_embeddings(texts)**: Batch embedding with automatic batching (default 50 texts per batch) and per-batch retry
|
||||
- **generate_embedding(text, content_type, file_path)**: Unified embedding with automatic chunking + mean pooling
|
||||
|
||||
**Key behavior**:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue