We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent afb4d50 commit a3bce83Copy full SHA for a3bce83
optimizely/cmab/cmab_client.py
@@ -19,9 +19,6 @@
19
from optimizely.helpers.enums import Errors
20
from optimizely.exceptions import CmabFetchError, CmabInvalidResponseError
21
22
-# CMAB_PREDICTION_ENDPOINT is the endpoint for CMAB predictions
23
-CMAB_PREDICTION_ENDPOINT = "https://prediction.cmab.optimizely.com/predict/%s"
24
-
25
# Default constants for CMAB requests
26
DEFAULT_MAX_RETRIES = 3
27
DEFAULT_INITIAL_BACKOFF = 0.1 # in seconds (100 ms)
@@ -87,7 +84,7 @@ def fetch_decision(
87
84
Returns:
88
85
str: The variation ID.
89
86
"""
90
- url = CMAB_PREDICTION_ENDPOINT % rule_id
+ url = f"https://prediction.cmab.optimizely.com/predict/{rule_id}"
91
cmab_attributes = [
92
{"id": key, "value": value, "type": "custom_attribute"}
93
for key, value in attributes.items()
0 commit comments