import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.feedback.batchGetCompletionFeedback({
batchGetFeedbackRequest: {
ids: [
"chatcmpl-abc123def456",
"chatcmpl-missing123",
],
},
});
console.log(result);
}
run();{
"results": [
{
"id": "chatcmpl-abc123def456",
"rating": "thumbs_up",
"description": "The response was accurate and helpful.",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
},
{
"id": "chatcmpl-missing123",
"error": "not_found"
}
]
}Retrieves feedback for multiple chat completions in a single batch request.
import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.feedback.batchGetCompletionFeedback({
batchGetFeedbackRequest: {
ids: [
"chatcmpl-abc123def456",
"chatcmpl-missing123",
],
},
});
console.log(result);
}
run();{
"results": [
{
"id": "chatcmpl-abc123def456",
"rating": "thumbs_up",
"description": "The response was accurate and helpful.",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
},
{
"id": "chatcmpl-missing123",
"error": "not_found"
}
]
}Authenticate with your MKA1 API key at the API gateway: Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, also send X-On-Behalf-Of to identify the end user making the request.
Optional external user identifier for multi-user server-side integrations. Use this when acting on behalf of one of your end users.
Request parameters for batch retrieving feedback by multiple request IDs.
Array of request IDs (chatcmpl-xxx or resp-xxx) to retrieve feedback for
1 - 100 elementsOK
Response containing batch feedback results. Each result is either the feedback data or a not_found error.
Array of feedback results in the same order as the input IDs
Error result when the completion/response ID doesn't exist
Show child attributes
Was this page helpful?