Create a completion feedback
curl --request POST \
--url https://api.lighton.ai/api/v2/rate/{feedback_type_id}/{completion_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.lighton.ai/api/v2/rate/{feedback_type_id}/{completion_id}"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.lighton.ai/api/v2/rate/{feedback_type_id}/{completion_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Feedbacks
Create a completion feedback
Log a feedback of a given type and linked to an existing completion.
POST
/
api
/
v2
/
rate
/
{feedback_type_id}
/
{completion_id}
Create a completion feedback
curl --request POST \
--url https://api.lighton.ai/api/v2/rate/{feedback_type_id}/{completion_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.lighton.ai/api/v2/rate/{feedback_type_id}/{completion_id}"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.lighton.ai/api/v2/rate/{feedback_type_id}/{completion_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Response
200
No response body