mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
* feat: add Perplexity embedding support (pplx-embed-v1) Add support for Perplexity AI's embedding models via the LLM HTTP handler: Models: - pplx-embed-v1-0.6b (1024 dims, 32K context, $0.004/1M tokens) - pplx-embed-v1-4b (2560 dims, 32K context, $0.03/1M tokens) Implementation: - PerplexityEmbeddingConfig in litellm/llms/perplexity/embedding/ - Registered in ProviderConfigManager, __init__.py lazy imports, main.py dispatch - Model pricing added to model_prices_and_context_window.json - Supports dimensions and encoding_format parameters - Uses base_llm_http_handler.embedding() pattern Tests: - 19 unit tests covering transformation, params, URLs, provider config, model info Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com> * docs: add Perplexity AI embeddings documentation - Create providers/perplexity_embedding.md with SDK and proxy usage examples - Convert Perplexity from flat doc to category in sidebars.js - Category includes existing chat/responses doc + new embeddings doc - Covers pplx-embed-v1-0.6b and pplx-embed-v1-4b models - Documents supported parameters (dimensions, encoding_format) - Includes proxy config and curl examples Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com> * fix: decode Perplexity base64_int8 embeddings to OpenAI-format float arrays 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> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| a2a_protocol | ||
| anthropic_interface | ||
| assistants | ||
| batch_completion | ||
| batches | ||
| caching | ||
| completion_extras | ||
| containers | ||
| endpoints/speech/speech_to_completion_bridge | ||
| evals | ||
| experimental_mcp_client | ||
| files | ||
| fine_tuning | ||
| google_genai | ||
| images | ||
| integrations | ||
| interactions | ||
| litellm_core_utils | ||
| llms | ||
| ocr | ||
| passthrough | ||
| proxy | ||
| proxy_auth | ||
| rag | ||
| realtime_api | ||
| rerank_api | ||
| responses | ||
| router_strategy | ||
| router_utils | ||
| search | ||
| secret_managers | ||
| skills | ||
| types | ||
| vector_store_files | ||
| vector_stores | ||
| videos | ||
| __init__.py | ||
| _lazy_imports.py | ||
| _lazy_imports_registry.py | ||
| _logging.py | ||
| _redis.py | ||
| _service_logger.py | ||
| _uuid.py | ||
| _version.py | ||
| anthropic_beta_headers_config.json | ||
| anthropic_beta_headers_manager.py | ||
| blog_posts.json | ||
| budget_manager.py | ||
| constants.py | ||
| cost.json | ||
| cost_calculator.py | ||
| exceptions.py | ||
| main.py | ||
| model_prices_and_context_window_backup.json | ||
| mypy.ini | ||
| policy_templates_backup.json | ||
| provider_endpoints_support_backup.json | ||
| py.typed | ||
| router.py | ||
| scheduler.py | ||
| timeout.py | ||
| utils.py | ||