mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
Perplexity returns embeddings as base64-encoded signed int8 values by default, not float arrays like OpenAI. This commit adds decoding in transform_embedding_response so the proxy returns standard OpenAI-compatible float arrays (normalized to [-1, 1]). - Added _decode_base64_embedding() static method - Handles both base64 strings (decoded) and float lists (passthrough) - Added 3 new tests for base64 decoding + passthrough Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_perplexity_embedding_transformation.py | ||