Skip to main content

Python client library for the Portkey API

Project description


Portkey streamlines API requests to 20+ LLMs. It provides a unified API signature for interacting with all LLMs alongwith powerful LLM Gateway features like load balancing, fallbacks, retries and more.

pip install portkey-ai

💡 Features

Name Description Example
🌐 Interoperability Write once, run with any provider. Switch between __ models from __ providers seamlessly. Open In Colab
🔀 Fallback Strategies Don't let failures stop you. If one provider fails, Portkey can automatically switch to another. Open In Colab
🔄 Retry Strategies Temporary issues shouldn't mean manual re-runs. Portkey can automatically retry failed requests. Open In Colab
⚖️ Load Balancing Distribute load effectively across multiple API keys or providers based on custom weights. Open In Colab
📝 Unified API Signature If you've used OpenAI, you already know how to use Portkey with any other provider. Open In Colab

🤝 Supported Providers

Provider Support Status Supported Endpoints
OpenAI ✅ Supported /completion, /embed
Azure OpenAI ✅ Supported /completion, /embed
Anthropic ✅ Supported /complete
Cohere ✅ Supported generate, embed
Google Bard 🚧 Coming Soon
LocalAI 🚧 Coming Soon

📝 Full Documentation | 🎯 Roadmap | 🐞 Bug Reports | 💡 Feature Requests

📞 Talk to the devs: Rohit | Ayush



Changelog

All notable changes to this project will be documented in this file. Dates are displayed in UTC.

Generated by auto-changelog.

v0.1.45

12 September 2023

  • feat: Add support for azure models #9
  • docs: Added examples for azure-openai fallback and loadbalance #8
  • chore: Updating the documentation #7
  • chore: Updating the documentation #6
  • chore: Adding an example for ab-testing and loadbalance #5

v0.1.44

11 September 2023

  • feat: added changie to generate changelogs #4
  • feat: version upgrade - 0.1.44 #3
  • feat: Workflow update cb80617
  • fea: Initial Commit 2c3631a
  • feat: adding the streaming capability into rubeus sdk f06e23b

We are excited to announce the stable release of the all-new Portkey Python SDK, version 0.1.44! This SDK makes it easier than ever to add production capabilities to your existing LLM systems with one line of change to your code.

Key Features and Enhancements of this release

  • Stability and Reliability: This release marks the stable version of Portkey Python SDK, thoroughly tested to ensure reliable performance in your projects.

  • Ease of Use: The SDK follows OpenAI SDK footprint, and with one line of change to your existing code, you can add Portkey's production features to your app.

  • Community Support: Join our growing community of practitioners putting LLMs in production. Share ideas, resolve doubts, and collaborate on projects.

Happy coding!

  • The Portkey Team

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

portkey-ai-0.1.49.tar.gz (16.4 kB view details)

Uploaded Source

File details

Details for the file portkey-ai-0.1.49.tar.gz.

File metadata

  • Download URL: portkey-ai-0.1.49.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for portkey-ai-0.1.49.tar.gz
Algorithm Hash digest
SHA256 787a8ac23f7034deb703e52672ee83bd262817a87262873c39c24d7862482d3e
MD5 15679abb38dd3454d1ced091d9dc059c
BLAKE2b-256 8e36806822200e1e9c2133c800b5258f037315532aee537c510cece22706f08b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page