Submit feedback for an objective
client.objectives.feedback.create(stringobjectiveID, FeedbackCreateParams { data } body, RequestOptionsoptions?): ObjectiveFeedback { data, metadata, info }
POST/v1/objectives/{objectiveId}/feedback
Submits feedback for an objective's execution. Feedback scores are used by the agent variation scoring system to evaluate and rank variation performance.
Submit feedback for an objective
import Cadenya from '@cadenya/cadenya';
const client = new Cadenya({
apiKey: process.env['CADENYA_API_KEY'], // This is the default and can be omitted
});
const objectiveFeedback = await client.objectives.feedback.create('objectiveId', { data: {} });
console.log(objectiveFeedback.data);{
"data": {
"attributes": {
"foo": "string"
},
"comment": "comment",
"score": 0
},
"metadata": {
"id": "id",
"name": "name"
},
"info": {
"submittedBy": {
"metadata": {
"id": "id",
"accountId": "accountId",
"name": "name",
"profileId": "profileId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"type": "PROFILE_TYPE_USER",
"email": "email",
"name": "name"
}
}
}
}Returns Examples
{
"data": {
"attributes": {
"foo": "string"
},
"comment": "comment",
"score": 0
},
"metadata": {
"id": "id",
"name": "name"
},
"info": {
"submittedBy": {
"metadata": {
"id": "id",
"accountId": "accountId",
"name": "name",
"profileId": "profileId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"type": "PROFILE_TYPE_USER",
"email": "email",
"name": "name"
}
}
}
}