aito.api.recommend¶
-
aito.api.
recommend
(client: aito.client.aito_client.AitoClient, query: Dict, raise_for_status: Optional[bool] = None, use_job: bool = False) → Union[aito.client.responses.query_api_response.RecommendResponse, aito.client.aito_client.RequestError]¶ send a query to the Recommend API
- Parameters
client (AitoClient) – the AitoClient instance
query (Dict) – the recommend query
raise_for_status (Optional[bool]) – raise
RequestError
if the request fails instead of returning the error If set to None, value from Client will be used. Defaults to Noneuse_job (bool) – use job fo request that takes longer than 30 seconds, defaults to False
- Returns
RecommendResponse
orRequestError
if an error occurred and not raise_for_status- Return type
Union[RecommendResponse, RequestError]