Last updated 10 months ago
Was this helpful?
from portkey_ai import Portkey # Initialize the Portkey client portkey = Portkey( api_key="PORTKEY_API_KEY", ) # Retrieve the configuration config = portkey.configs.retrieve( slug='CONFIG_SLUG' ) print(config)
Config details
{ "success": true, "data": { "config": { "retry": { "attempts": 5, "on_status_codes": [ 429, 529 ] }, "cache": { "mode": "simple", "max_age": 3600 }, "strategy": { "mode": "fallback" }, "targets": [ { "provider": "openai", "virtual_key": "main-258f4d" }, { "provider": "azure-openai", "virtual_key": "azure-test-4110dd" } ] } } }