mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 07:39:53 +08:00
Fixes #346 When an embedding provider returns null for a chunk's embedding vector, the None value gets stored in the vector index and causes a TypeError in LlamaIndex's similarity computation (np.dot with NoneType). Two-layer fix: 1. _extract_embeddings_from_response: use 'or []' instead of get(key, default) so explicit None values are caught. 2. CustomEmbedding._get_text_embeddings: validate the batch result and replace any None vectors with zero vectors. Co-authored-by: kagura-agent <kagura-agent@users.noreply.github.com>