File tree 1 file changed +2
-3
lines changed
1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ def fetch_decision(
73
73
user_id : str ,
74
74
attributes : Dict [str , Any ],
75
75
cmab_uuid : str ,
76
- timeout : Optional [ float ] = None
76
+ timeout : float = MAX_WAIT_TIME
77
77
) -> str :
78
78
"""Fetch a decision from the CMAB prediction service.
79
79
@@ -82,13 +82,12 @@ def fetch_decision(
82
82
user_id (str): The user ID for the request.
83
83
attributes (Dict[str, Any]): User attributes for the request.
84
84
cmab_uuid (str): Unique identifier for the CMAB request.
85
- timeout (float): Maximum wait time for request to respond in seconds.
85
+ timeout (float): Maximum wait time for request to respond in seconds. Defaults to 10 seconds.
86
86
87
87
Returns:
88
88
str: The variation ID.
89
89
"""
90
90
url = CMAB_PREDICTION_ENDPOINT % rule_id
91
- timeout = timeout or MAX_WAIT_TIME
92
91
cmab_attributes = [
93
92
{"id" : key , "value" : value , "type" : "custom_attribute" }
94
93
for key , value in attributes .items ()
You can’t perform that action at this time.
0 commit comments