portkey = Portkey(
api_key="PORTKEY_API_KEY",
)
# Update the configuration
updated_config = portkey.configs.update(
slug="CONFIG_SLUG",
name="Updated Config",
config={
"retry": {
"attempts": 3
},
"cache": {
"mode": "semantic"
}
}
)
print(updated_config)
{
"success": true,
"data": {
"version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}portkey = Portkey(
api_key="PORTKEY_API_KEY",
)
# Update the configuration
updated_config = portkey.configs.update(
slug="CONFIG_SLUG",
name="Updated Config",
config={
"retry": {
"attempts": 3
},
"cache": {
"mode": "semantic"
}
}
)
print(updated_config)
{
"success": true,
"data": {
"version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Was this page helpful?