Lytix supports capturing feedback directly from users, similar to ๐/๐ mechanisms.
Note: You likely want to be using the proxy integration to capture feedback. This is because you need the modelIOEventId to be able to capture feedback.
Now we can extract the ioEventId and send it to the feedback endpoint.
Python
Copy
import requestsimport json# Extract the IO Event IDioEventId = response.to_dict()['lytix-proxy-payload']['lytixEventId']# Or if you are in the EU ๐ช๐บ: https://eu.api.lytix.co/v2/metrics/setUserFeedbackurl = "https://api.lytix.co/v2/metrics/setUserFeedback"payload = json.dumps({ "modelIOEventId": ioEventId, "userFeedback": "POSITIVE" # OR NEGATIVE})headers = { # Add your lytix api key 'lx-api-key': '$LYTIX_API_KEY', 'Content-Type': 'application/json'}response = requests.request("POST", url, headers=headers, data=payload)