File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ def fetch_decision(
7373 user_id : str ,
7474 attributes : Dict [str , Any ],
7575 cmab_uuid : str ,
76- timeout : Optional [ float ] = None
76+ timeout : float = MAX_WAIT_TIME
7777 ) -> str :
7878 """Fetch a decision from the CMAB prediction service.
7979
@@ -82,13 +82,12 @@ def fetch_decision(
8282 user_id (str): The user ID for the request.
8383 attributes (Dict[str, Any]): User attributes for the request.
8484 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.
8686
8787 Returns:
8888 str: The variation ID.
8989 """
9090 url = CMAB_PREDICTION_ENDPOINT % rule_id
91- timeout = timeout or MAX_WAIT_TIME
9291 cmab_attributes = [
9392 {"id" : key , "value" : value , "type" : "custom_attribute" }
9493 for key , value in attributes .items ()
You can’t perform that action at this time.
0 commit comments