Commit Graph

10 Commits

Author SHA1 Message Date
Kian Jones
01cb00ae10 Revert "fix: truncate oversized text in embedding requests" (#9227)
Revert "fix: truncate oversized text in embedding requests (#9196)"

This reverts commit a9c342087e022519c63d62fb76b72aed8859539b.
2026-02-24 10:52:06 -08:00
Kian Jones
630c147b13 fix: truncate oversized text in embedding requests (#9196)
fix: handle oversized text in embedding requests with recursive chunking

When message text exceeds the embedding model's context length, recursively
split it until all chunks can be embedded successfully.

Changes:
- `tpuf_client.py`: Add `_split_text_in_half()` helper for recursive splitting
- `tpuf_client.py`: Add `_generate_embeddings_with_chunking()` that retries
  with splits on context length errors
- `tpuf_client.py`: Store `message_id` and `chunk_index` columns in Turbopuffer
- `tpuf_client.py`: Deduplicate query results by `message_id`
- `tpuf_client.py`: Use `LettaInvalidArgumentError` instead of `ValueError`
- `tpuf_client.py`: Move LLMClient import to top of file
- `openai_client.py`: Remove fixed truncation (chunking handles this now)
- Add tests for `_split_text_in_half` and chunked query deduplication

🤖 Generated with [Letta Code](https://letta.com)

Co-authored-by: Letta <noreply@letta.com>
2026-02-24 10:52:06 -08:00
Sarah Wooders
0c0ba5d03d fix: remove letta-free embeddings from testing (#6870) 2025-12-15 12:03:09 -08:00
Matthew Zhou
09ba075cfa feat: Modify embedding strategy to first halve the batch size v.s. the batc… [LET-5510] (#5434)
Modify embedding strategy to first halve the batch size v.s. the batch size
2025-10-24 15:12:11 -07:00
Matthew Zhou
fa5415f0e3 fix: Fix test embeddings (#4920)
Fix test embeddings
2025-10-07 17:50:46 -07:00
Kian Jones
b8e9a80d93 merge this (#4759)
* wait I forgot to comit locally

* cp the entire core directory and then rm the .git subdir
2025-09-17 15:47:40 -07:00
Kian Jones
22f70ca07c chore: officially migrate to submodule (#4502)
* remove apps/core and apps/fern

* fix precommit

* add submodule updates in workflows

* submodule

* remove core tests

* update core revision

* Add submodules: true to all GitHub workflows

- Ensure all workflows can access git submodules
- Add submodules support to deployment, test, and CI workflows
- Fix YAML syntax issues in workflow files

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* remove core-lint

* upgrade core with latest main of oss

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-09 12:45:53 -07:00
Matthew Zhou
0eed3722cc feat: Robustify openai embedding [LET-4256] (#4478)
* Robustify embedding

* Remove unecessary imports

* Add test embeddings
2025-09-08 17:18:54 -07:00
cthomas
74ee4dd4fe fix: test embeddings missing fixture [LET-4062] (#4244)
fix: test embeddings missing fixture
2025-08-27 10:11:56 -07:00
Sarah Wooders
f6c59b949c feat: add unit tests for embeddings (#4108)
Co-authored-by: Kian Jones <kian@letta.com>
Co-authored-by: Kian Jones <11655409+kianjones9@users.noreply.github.com>
2025-08-25 13:37:41 -07:00