import uuid
# Define request ID
my_helicone_request_id = str(uuid.uuid4())
# Request to LLM provider
...
"Helicone-Request-Id": my_helicone_request_id
...
# While the above code is executing, you can perform other tasks such as providing feedback on a specific request.
import requests
url = 'https://api.helicone.ai/v1/feedback'
headers = {
'Helicone-Auth': 'YOUR_HELICONE_AUTH_HEADER',
'Content-Type': 'application/json'
}
data = {
'helicone-id': my_helicone_request_id,
'rating': True # true for positive, false for negative
}
response = requests.post(url, headers=headers, json=data)