azure.cognitiveservices.personalizer.operations module

class azure.cognitiveservices.personalizer.operations.EventsOperations(client, config, serializer, deserializer)[source]

Bases: object

EventsOperations operations.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

activate(event_id, custom_headers=None, raw=False, **operation_config)[source]

Report that the specified event was actually displayed to the user and a reward should be expected for it.

Parameters
  • event_id (str) – The event ID this activation applies to.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

None or ClientRawResponse if raw=true

Return type

None or ClientRawResponse

Raises

HttpOperationError

reward(event_id, value, custom_headers=None, raw=False, **operation_config)[source]

Report reward to allocate to the top ranked action for the specified event.

Parameters
  • event_id (str) – The event id this reward applies to.

  • value (float) – Reward to be assigned to an action. Value should be between -1 and 1 inclusive.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

None or ClientRawResponse if raw=true

Return type

None or ClientRawResponse

Raises

HttpOperationError

models = <module 'azure.cognitiveservices.personalizer.models' from '/home/vsts/work/1/s/sdk/cognitiveservices/azure-cognitiveservices-personalizer/.tox/sphinx/lib/python3.6/site-packages/azure/cognitiveservices/personalizer/models/__init__.py'>